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
This commit is contained in:
Stephan Aßmus 2010-12-19 10:44:20 +00:00
parent 1e9af0512d
commit 22334353d0

View File

@ -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;
}