mirror of
https://github.com/gryf/wmaker.git
synced 2026-01-26 01:15:52 +01:00
simplify WMWritePropListToFile()
remove the choice of atomic/non-atomic writes. firstly, the only users of non-atomic writes were getstyle and geticonset; secondly, who in their right minds would ever want non-atomic writes; thirdly, the file system will screw you anyway *G*.
This commit is contained in:
committed by
Carlos R. Mafra
parent
833128385f
commit
badecc244b
@@ -152,10 +152,10 @@ void WMSynchronizeUserDefaults(WMUserDefaults * database)
|
||||
} else {
|
||||
/* something happened with the file. just overwrite it */
|
||||
wwarning(_("cannot read domain from file '%s' when syncing"), path);
|
||||
WMWritePropListToFile(database->appDomain, path, True);
|
||||
WMWritePropListToFile(database->appDomain, path);
|
||||
}
|
||||
} else if (database->dirty) {
|
||||
WMWritePropListToFile(database->appDomain, path, True);
|
||||
WMWritePropListToFile(database->appDomain, path);
|
||||
} else if (fileIsNewer) {
|
||||
plF = WMReadPropListFromFile(path);
|
||||
if (plF) {
|
||||
@@ -167,7 +167,7 @@ void WMSynchronizeUserDefaults(WMUserDefaults * database)
|
||||
} else {
|
||||
/* something happened with the file. just overwrite it */
|
||||
wwarning(_("cannot read domain from file '%s' when syncing"), path);
|
||||
WMWritePropListToFile(database->appDomain, path, True);
|
||||
WMWritePropListToFile(database->appDomain, path);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -199,7 +199,7 @@ void WMSaveUserDefaults(WMUserDefaults * database)
|
||||
} else {
|
||||
path = database->path;
|
||||
}
|
||||
WMWritePropListToFile(database->appDomain, path, True);
|
||||
WMWritePropListToFile(database->appDomain, path);
|
||||
database->dirty = 0;
|
||||
if (stat(path, &stbuf) >= 0)
|
||||
database->timestamp = stbuf.st_mtime;
|
||||
|
||||
Reference in New Issue
Block a user