From 22334353d02dbc10f922a5154f44d68cd71c8b7a Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Stephan=20A=C3=9Fmus?= Date: Sun, 19 Dec 2010 10:44:20 +0000 Subject: [PATCH] Only print unexpected errors to stderr when constructing the settings file. Fixes ticket #6899. git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@39890 a95241bf-73f2-0310-859d-f6bbb57e9c96 --- src/apps/drivesetup/DriveSetup.cpp | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/src/apps/drivesetup/DriveSetup.cpp b/src/apps/drivesetup/DriveSetup.cpp index 672d433405..06d4d64e63 100644 --- a/src/apps/drivesetup/DriveSetup.cpp +++ b/src/apps/drivesetup/DriveSetup.cpp @@ -135,7 +135,11 @@ DriveSetup::_GetSettingsFile(BFile& file, bool forWriting) const ret = file.SetTo(path.Path(), forWriting ? writeFlags : readFlags); if (ret != B_OK) { - fprintf(stderr, "failed to init file: %s\n", strerror(ret)); + if (forWriting) { + // Only inform of an error if the file was supposed to be written. + fprintf(stderr, "failed to init settings file: %s\n", + strerror(ret)); + } return ret; }