summaryrefslogtreecommitdiff
path: root/src/Fl_Preferences.cxx
diff options
context:
space:
mode:
authorMatthias Melcher <git@matthiasm.com>2020-01-03 17:05:52 +0100
committerMatthias Melcher <git@matthiasm.com>2020-01-03 17:05:52 +0100
commit8147199a41e8cc39b0268433916dfccfcfc8e6eb (patch)
treec2261f81fc5c22b25644cc9e1abc366bee49e837 /src/Fl_Preferences.cxx
parentdb6fa8bf86407a0d1a1de180fff55702e1f75d6f (diff)
macOS: checking Fl_Preferences file path improved
zlib: removed warning
Diffstat (limited to 'src/Fl_Preferences.cxx')
-rw-r--r--src/Fl_Preferences.cxx6
1 files changed, 3 insertions, 3 deletions
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)