From 8147199a41e8cc39b0268433916dfccfcfc8e6eb Mon Sep 17 00:00:00 2001 From: Matthias Melcher Date: Fri, 3 Jan 2020 17:05:52 +0100 Subject: macOS: checking Fl_Preferences file path improved zlib: removed warning --- src/Fl_Preferences.cxx | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'src/Fl_Preferences.cxx') diff --git a/src/Fl_Preferences.cxx b/src/Fl_Preferences.cxx index 424f0bc87..4ac4d8a69 100644 --- a/src/Fl_Preferences.cxx +++ b/src/Fl_Preferences.cxx @@ -923,7 +923,7 @@ Fl_Preferences::RootNode::~RootNode() { // read a preferences file and construct the group tree and with all entry leafs int Fl_Preferences::RootNode::read() { - if (!filename_) // RUNTIME preferences + if (!filename_) // RUNTIME preferences, or filename could not be created return -1; if ( (root_ & Fl_Preferences::CORE) && !(fileAccess_ & Fl_Preferences::CORE_READ_OK) ) { prefs_->node->clearDirtyFlags(); @@ -972,7 +972,7 @@ int Fl_Preferences::RootNode::read() { // write the group tree and all entry leafs int Fl_Preferences::RootNode::write() { - if (!filename_) // RUNTIME preferences + if (!filename_) // RUNTIME preferences, or filename could not be created return -1; if ( (root_ & Fl_Preferences::CORE) && !(fileAccess_ & Fl_Preferences::CORE_WRITE_OK) ) return -1; @@ -1010,7 +1010,7 @@ int Fl_Preferences::RootNode::write() { // - copy the path into the buffer at "path" // - if the resulting path is longer than "pathlen", it will be cropped char Fl_Preferences::RootNode::getPath( char *path, int pathlen ) { - if (!filename_) // RUNTIME preferences + if (!filename_) // RUNTIME preferences. or filename could not be created return 1; // return 1 (not -1) to be consistent with fl_make_path() if (pathlen<=0) -- cgit v1.2.3