see changelog. compiles, otherwise untested, but should be a no-op
really.
>From 904c779b083cfef9a2f4588d0591a74c942faa37 Mon Sep 17 00:00:00 2001
From: Tamas TEVESZ <[email protected]>
Date: Mon, 15 Mar 2010 23:12:24 +0100
Subject: [PATCH] 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*.
---
WINGs/WINGs/WUtil.h | 2 +-
WINGs/WINGs/proplist-compat.h | 2 +-
WINGs/proplist.c | 67 +++++++++++++++++------------------------
WINGs/userdefaults.c | 8 ++--
WPrefs.app/Menu.c | 2 +-
WPrefs.app/WPrefs.c | 2 +-
src/dialog.c | 2 +-
src/misc.c | 2 +-
src/screen.c | 2 +-
util/convertfonts.c | 2 +-
util/geticonset.c | 2 +-
util/getstyle.c | 4 +-
util/seticons.c | 2 +-
util/setstyle.c | 2 +-
util/wdwrite.c | 2 +-
15 files changed, 46 insertions(+), 57 deletions(-)
diff --git a/WINGs/WINGs/WUtil.h b/WINGs/WINGs/WUtil.h
index ee05c4b..dbf7074 100644
--- a/WINGs/WINGs/WUtil.h
+++ b/WINGs/WINGs/WUtil.h
@@ -837,7 +837,7 @@ char* WMGetPropListDescription(WMPropList *plist, Bool
indented);
WMPropList* WMReadPropListFromFile(char *file);
-Bool WMWritePropListToFile(WMPropList *plist, char *path, Bool atomically);
+Bool WMWritePropListToFile(WMPropList *plist, char *path);
/*......................................................................*/
diff --git a/WINGs/WINGs/proplist-compat.h b/WINGs/WINGs/proplist-compat.h
index 7077b2d..18ec457 100644
--- a/WINGs/WINGs/proplist-compat.h
+++ b/WINGs/WINGs/proplist-compat.h
@@ -115,7 +115,7 @@ typedef WMPropList* proplist_t;
#define PLGetDataDescription(pl) WMGetPropListDescription(pl, False)
#define PLGetProplistWithPath(file) WMReadPropListFromFile(file)
-#define PLSave(pl, file, atm) WMWritePropListToFile(pl, file, atm)
+#define PLSave(pl, file, atm) WMWritePropListToFile(pl, file)
/* Unsupported functions. Do not ask for them. They're evil :P */
diff --git a/WINGs/proplist.c b/WINGs/proplist.c
index 4983c73..a6cfb2f 100644
--- a/WINGs/proplist.c
+++ b/WINGs/proplist.c
@@ -1550,47 +1550,41 @@ WMPropList *WMReadPropListFromFile(char *file)
/* TODO: review this function's code */
-Bool WMWritePropListToFile(WMPropList * plist, char *path, Bool atomically)
+Bool WMWritePropListToFile(WMPropList * plist, char *path)
{
char *thePath = NULL;
char *desc;
FILE *theFile;
+#ifdef HAVE_MKSTEMP
+ int fd, mask;
+#endif
if (!WMMkDirHier(path))
return False;
- if (atomically) {
-#ifdef HAVE_MKSTEMP
- int fd, mask;
-#endif
-
- /* Use the path name of the destination file as a prefix for the
- * mkstemp() call so that we can be sure that both files are on
- * the same filesystem and the subsequent rename() will work. */
- thePath = wstrconcat(path, ".XXXXXX");
+ /* Use the path name of the destination file as a prefix for the
+ * mkstemp() call so that we can be sure that both files are on
+ * the same filesystem and the subsequent rename() will work. */
+ thePath = wstrconcat(path, ".XXXXXX");
#ifdef HAVE_MKSTEMP
- if ((fd = mkstemp(thePath)) < 0) {
- wsyserror(_("mkstemp (%s) failed"), thePath);
- goto failure;
- }
- mask = umask(0);
- umask(mask);
- fchmod(fd, 0644 & ~mask);
- if ((theFile = fdopen(fd, "wb")) == NULL) {
- close(fd);
- }
+ if ((fd = mkstemp(thePath)) < 0) {
+ wsyserror(_("mkstemp (%s) failed"), thePath);
+ goto failure;
+ }
+ mask = umask(0);
+ umask(mask);
+ fchmod(fd, 0644 & ~mask);
+ if ((theFile = fdopen(fd, "wb")) == NULL) {
+ close(fd);
+ }
#else
- if (mktemp(thePath) == NULL) {
- wsyserror(_("mktemp (%s) failed"), thePath);
- goto failure;
- }
- theFile = fopen(thePath, "wb");
-#endif
- } else {
- thePath = wstrdup(path);
- theFile = fopen(thePath, "wb");
+ if (mktemp(thePath) == NULL) {
+ wsyserror(_("mktemp (%s) failed"), thePath);
+ goto failure;
}
+ theFile = fopen(thePath, "wb");
+#endif
if (theFile == NULL) {
wsyserror(_("open (%s) failed"), thePath);
@@ -1615,22 +1609,17 @@ Bool WMWritePropListToFile(WMPropList * plist, char
*path, Bool atomically)
/* If we used a temporary file, we still need to rename() it be the
* real file. Also, we need to try to retain the file attributes of
* the original file we are overwriting (if we are) */
- if (atomically) {
- if (rename(thePath, path) != 0) {
- wsyserror(_("rename ('%s' to '%s') failed"), thePath,
path);
- goto failure;
- }
+ if (rename(thePath, path) != 0) {
+ wsyserror(_("rename ('%s' to '%s') failed"), thePath, path);
+ goto failure;
}
wfree(thePath);
return True;
failure:
- if (atomically) {
- unlink(thePath);
- wfree(thePath);
- }
-
+ unlink(thePath);
+ wfree(thePath);
return False;
}
diff --git a/WINGs/userdefaults.c b/WINGs/userdefaults.c
index 2942745..742b614 100644
--- a/WINGs/userdefaults.c
+++ b/WINGs/userdefaults.c
@@ -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;
diff --git a/WPrefs.app/Menu.c b/WPrefs.app/Menu.c
index dd7c30f..dccb85b 100644
--- a/WPrefs.app/Menu.c
+++ b/WPrefs.app/Menu.c
@@ -1677,7 +1677,7 @@ static void storeData(_Panel * panel)
menu = buildPLFromMenu(panel);
- WMWritePropListToFile(menu, panel->menuPath, True);
+ WMWritePropListToFile(menu, panel->menuPath);
WMReleasePropList(menu);
}
diff --git a/WPrefs.app/WPrefs.c b/WPrefs.app/WPrefs.c
index 5b956f1..328791d 100644
--- a/WPrefs.app/WPrefs.c
+++ b/WPrefs.app/WPrefs.c
@@ -149,7 +149,7 @@ static void save(WMWidget * w, void *data)
WMReleasePropList(keyList);
/* puts("storing data"); */
- WMWritePropListToFile(WindowMakerDB, WindowMakerDBPath, True);
+ WMWritePropListToFile(WindowMakerDB, WindowMakerDBPath);
memset(&ev, 0, sizeof(XEvent));
diff --git a/src/dialog.c b/src/dialog.c
index 80aabad..57ef927 100644
--- a/src/dialog.c
+++ b/src/dialog.c
@@ -225,7 +225,7 @@ static void SaveHistory(WMArray * history, char *filename)
for (i = 0; i < WMGetArrayItemCount(history); ++i)
WMAddToPLArray(plhistory,
WMCreatePLString(WMGetFromArray(history, i)));
- WMWritePropListToFile(plhistory, (char *)filename, True);
+ WMWritePropListToFile(plhistory, (char *)filename);
WMReleasePropList(plhistory);
}
diff --git a/src/misc.c b/src/misc.c
index 14fc75e..df4c1f0 100644
--- a/src/misc.c
+++ b/src/misc.c
@@ -1080,7 +1080,7 @@ Bool UpdateDomainFile(WDDomain * domain)
}
}
- result = WMWritePropListToFile(dict, domain->path, True);
+ result = WMWritePropListToFile(dict, domain->path);
if (freeDict) {
WMReleasePropList(dict);
diff --git a/src/screen.c b/src/screen.c
index 6dd30ba..884e4f2 100644
--- a/src/screen.c
+++ b/src/screen.c
@@ -967,7 +967,7 @@ void wScreenSaveState(WScreen * scr)
snprintf(buf, sizeof(buf), "WMState.%i", scr->screen);
str = wdefaultspathfordomain(buf);
}
- if (!WMWritePropListToFile(scr->session_state, str, True)) {
+ if (!WMWritePropListToFile(scr->session_state, str)) {
wsyserror(_("could not save session state in %s"), str);
}
wfree(str);
diff --git a/util/convertfonts.c b/util/convertfonts.c
index c304b7d..7fe4f19 100644
--- a/util/convertfonts.c
+++ b/util/convertfonts.c
@@ -135,7 +135,7 @@ int main(int argc, char **argv)
WMReleasePropList(key);
}
- WMWritePropListToFile(style, file, True);
+ WMWritePropListToFile(style, file);
exit(0);
}
diff --git a/util/geticonset.c b/util/geticonset.c
index 810829e..dc9dec1 100644
--- a/util/geticonset.c
+++ b/util/geticonset.c
@@ -118,7 +118,7 @@ int main(int argc, char **argv)
}
if (argc == 2) {
- WMWritePropListToFile(iconset, argv[1], False);
+ WMWritePropListToFile(iconset, argv[1]);
} else {
puts(WMGetPropListDescription(iconset, True));
}
diff --git a/util/getstyle.c b/util/getstyle.c
index 87924ad..8f519d2 100644
--- a/util/getstyle.c
+++ b/util/getstyle.c
@@ -612,11 +612,11 @@ int main(int argc, char **argv)
path = wmalloc(strlen(ThemePath) + 32);
strcpy(path, ThemePath);
strcat(path, "/style");
- WMWritePropListToFile(style, path, False);
+ WMWritePropListToFile(style, path);
wfree(path);
} else {
if (style_file) {
- WMWritePropListToFile(style, style_file, False);
+ WMWritePropListToFile(style, style_file);
} else {
puts(WMGetPropListDescription(style, True));
}
diff --git a/util/seticons.c b/util/seticons.c
index 568e0b1..ab5b134 100644
--- a/util/seticons.c
+++ b/util/seticons.c
@@ -135,7 +135,7 @@ int main(int argc, char **argv)
}
}
- WMWritePropListToFile(all_windows, path, True);
+ WMWritePropListToFile(all_windows, path);
exit(0);
}
diff --git a/util/setstyle.c b/util/setstyle.c
index 692fb61..6734ca4 100644
--- a/util/setstyle.c
+++ b/util/setstyle.c
@@ -536,7 +536,7 @@ int main(int argc, char **argv)
WMMergePLDictionaries(prop, style, True);
- WMWritePropListToFile(prop, path, True);
+ WMWritePropListToFile(prop, path);
{
XEvent ev;
diff --git a/util/wdwrite.c b/util/wdwrite.c
index ea686df..34088cd 100644
--- a/util/wdwrite.c
+++ b/util/wdwrite.c
@@ -124,7 +124,7 @@ int main(int argc, char **argv)
WMPutInPLDictionary(dict, key, value);
}
- WMWritePropListToFile(dict, path, True);
+ WMWritePropListToFile(dict, path);
wfree(path);
return 0;
--
1.7.0
--
[-]
mkdir /nonexistentFrom 904c779b083cfef9a2f4588d0591a74c942faa37 Mon Sep 17 00:00:00 2001
From: Tamas TEVESZ <[email protected]>
Date: Mon, 15 Mar 2010 23:12:24 +0100
Subject: [PATCH] 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*.
---
WINGs/WINGs/WUtil.h | 2 +-
WINGs/WINGs/proplist-compat.h | 2 +-
WINGs/proplist.c | 67 +++++++++++++++++------------------------
WINGs/userdefaults.c | 8 ++--
WPrefs.app/Menu.c | 2 +-
WPrefs.app/WPrefs.c | 2 +-
src/dialog.c | 2 +-
src/misc.c | 2 +-
src/screen.c | 2 +-
util/convertfonts.c | 2 +-
util/geticonset.c | 2 +-
util/getstyle.c | 4 +-
util/seticons.c | 2 +-
util/setstyle.c | 2 +-
util/wdwrite.c | 2 +-
15 files changed, 46 insertions(+), 57 deletions(-)
diff --git a/WINGs/WINGs/WUtil.h b/WINGs/WINGs/WUtil.h
index ee05c4b..dbf7074 100644
--- a/WINGs/WINGs/WUtil.h
+++ b/WINGs/WINGs/WUtil.h
@@ -837,7 +837,7 @@ char* WMGetPropListDescription(WMPropList *plist, Bool indented);
WMPropList* WMReadPropListFromFile(char *file);
-Bool WMWritePropListToFile(WMPropList *plist, char *path, Bool atomically);
+Bool WMWritePropListToFile(WMPropList *plist, char *path);
/*......................................................................*/
diff --git a/WINGs/WINGs/proplist-compat.h b/WINGs/WINGs/proplist-compat.h
index 7077b2d..18ec457 100644
--- a/WINGs/WINGs/proplist-compat.h
+++ b/WINGs/WINGs/proplist-compat.h
@@ -115,7 +115,7 @@ typedef WMPropList* proplist_t;
#define PLGetDataDescription(pl) WMGetPropListDescription(pl, False)
#define PLGetProplistWithPath(file) WMReadPropListFromFile(file)
-#define PLSave(pl, file, atm) WMWritePropListToFile(pl, file, atm)
+#define PLSave(pl, file, atm) WMWritePropListToFile(pl, file)
/* Unsupported functions. Do not ask for them. They're evil :P */
diff --git a/WINGs/proplist.c b/WINGs/proplist.c
index 4983c73..a6cfb2f 100644
--- a/WINGs/proplist.c
+++ b/WINGs/proplist.c
@@ -1550,47 +1550,41 @@ WMPropList *WMReadPropListFromFile(char *file)
/* TODO: review this function's code */
-Bool WMWritePropListToFile(WMPropList * plist, char *path, Bool atomically)
+Bool WMWritePropListToFile(WMPropList * plist, char *path)
{
char *thePath = NULL;
char *desc;
FILE *theFile;
+#ifdef HAVE_MKSTEMP
+ int fd, mask;
+#endif
if (!WMMkDirHier(path))
return False;
- if (atomically) {
-#ifdef HAVE_MKSTEMP
- int fd, mask;
-#endif
-
- /* Use the path name of the destination file as a prefix for the
- * mkstemp() call so that we can be sure that both files are on
- * the same filesystem and the subsequent rename() will work. */
- thePath = wstrconcat(path, ".XXXXXX");
+ /* Use the path name of the destination file as a prefix for the
+ * mkstemp() call so that we can be sure that both files are on
+ * the same filesystem and the subsequent rename() will work. */
+ thePath = wstrconcat(path, ".XXXXXX");
#ifdef HAVE_MKSTEMP
- if ((fd = mkstemp(thePath)) < 0) {
- wsyserror(_("mkstemp (%s) failed"), thePath);
- goto failure;
- }
- mask = umask(0);
- umask(mask);
- fchmod(fd, 0644 & ~mask);
- if ((theFile = fdopen(fd, "wb")) == NULL) {
- close(fd);
- }
+ if ((fd = mkstemp(thePath)) < 0) {
+ wsyserror(_("mkstemp (%s) failed"), thePath);
+ goto failure;
+ }
+ mask = umask(0);
+ umask(mask);
+ fchmod(fd, 0644 & ~mask);
+ if ((theFile = fdopen(fd, "wb")) == NULL) {
+ close(fd);
+ }
#else
- if (mktemp(thePath) == NULL) {
- wsyserror(_("mktemp (%s) failed"), thePath);
- goto failure;
- }
- theFile = fopen(thePath, "wb");
-#endif
- } else {
- thePath = wstrdup(path);
- theFile = fopen(thePath, "wb");
+ if (mktemp(thePath) == NULL) {
+ wsyserror(_("mktemp (%s) failed"), thePath);
+ goto failure;
}
+ theFile = fopen(thePath, "wb");
+#endif
if (theFile == NULL) {
wsyserror(_("open (%s) failed"), thePath);
@@ -1615,22 +1609,17 @@ Bool WMWritePropListToFile(WMPropList * plist, char *path, Bool atomically)
/* If we used a temporary file, we still need to rename() it be the
* real file. Also, we need to try to retain the file attributes of
* the original file we are overwriting (if we are) */
- if (atomically) {
- if (rename(thePath, path) != 0) {
- wsyserror(_("rename ('%s' to '%s') failed"), thePath, path);
- goto failure;
- }
+ if (rename(thePath, path) != 0) {
+ wsyserror(_("rename ('%s' to '%s') failed"), thePath, path);
+ goto failure;
}
wfree(thePath);
return True;
failure:
- if (atomically) {
- unlink(thePath);
- wfree(thePath);
- }
-
+ unlink(thePath);
+ wfree(thePath);
return False;
}
diff --git a/WINGs/userdefaults.c b/WINGs/userdefaults.c
index 2942745..742b614 100644
--- a/WINGs/userdefaults.c
+++ b/WINGs/userdefaults.c
@@ -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;
diff --git a/WPrefs.app/Menu.c b/WPrefs.app/Menu.c
index dd7c30f..dccb85b 100644
--- a/WPrefs.app/Menu.c
+++ b/WPrefs.app/Menu.c
@@ -1677,7 +1677,7 @@ static void storeData(_Panel * panel)
menu = buildPLFromMenu(panel);
- WMWritePropListToFile(menu, panel->menuPath, True);
+ WMWritePropListToFile(menu, panel->menuPath);
WMReleasePropList(menu);
}
diff --git a/WPrefs.app/WPrefs.c b/WPrefs.app/WPrefs.c
index 5b956f1..328791d 100644
--- a/WPrefs.app/WPrefs.c
+++ b/WPrefs.app/WPrefs.c
@@ -149,7 +149,7 @@ static void save(WMWidget * w, void *data)
WMReleasePropList(keyList);
/* puts("storing data"); */
- WMWritePropListToFile(WindowMakerDB, WindowMakerDBPath, True);
+ WMWritePropListToFile(WindowMakerDB, WindowMakerDBPath);
memset(&ev, 0, sizeof(XEvent));
diff --git a/src/dialog.c b/src/dialog.c
index 80aabad..57ef927 100644
--- a/src/dialog.c
+++ b/src/dialog.c
@@ -225,7 +225,7 @@ static void SaveHistory(WMArray * history, char *filename)
for (i = 0; i < WMGetArrayItemCount(history); ++i)
WMAddToPLArray(plhistory, WMCreatePLString(WMGetFromArray(history, i)));
- WMWritePropListToFile(plhistory, (char *)filename, True);
+ WMWritePropListToFile(plhistory, (char *)filename);
WMReleasePropList(plhistory);
}
diff --git a/src/misc.c b/src/misc.c
index 14fc75e..df4c1f0 100644
--- a/src/misc.c
+++ b/src/misc.c
@@ -1080,7 +1080,7 @@ Bool UpdateDomainFile(WDDomain * domain)
}
}
- result = WMWritePropListToFile(dict, domain->path, True);
+ result = WMWritePropListToFile(dict, domain->path);
if (freeDict) {
WMReleasePropList(dict);
diff --git a/src/screen.c b/src/screen.c
index 6dd30ba..884e4f2 100644
--- a/src/screen.c
+++ b/src/screen.c
@@ -967,7 +967,7 @@ void wScreenSaveState(WScreen * scr)
snprintf(buf, sizeof(buf), "WMState.%i", scr->screen);
str = wdefaultspathfordomain(buf);
}
- if (!WMWritePropListToFile(scr->session_state, str, True)) {
+ if (!WMWritePropListToFile(scr->session_state, str)) {
wsyserror(_("could not save session state in %s"), str);
}
wfree(str);
diff --git a/util/convertfonts.c b/util/convertfonts.c
index c304b7d..7fe4f19 100644
--- a/util/convertfonts.c
+++ b/util/convertfonts.c
@@ -135,7 +135,7 @@ int main(int argc, char **argv)
WMReleasePropList(key);
}
- WMWritePropListToFile(style, file, True);
+ WMWritePropListToFile(style, file);
exit(0);
}
diff --git a/util/geticonset.c b/util/geticonset.c
index 810829e..dc9dec1 100644
--- a/util/geticonset.c
+++ b/util/geticonset.c
@@ -118,7 +118,7 @@ int main(int argc, char **argv)
}
if (argc == 2) {
- WMWritePropListToFile(iconset, argv[1], False);
+ WMWritePropListToFile(iconset, argv[1]);
} else {
puts(WMGetPropListDescription(iconset, True));
}
diff --git a/util/getstyle.c b/util/getstyle.c
index 87924ad..8f519d2 100644
--- a/util/getstyle.c
+++ b/util/getstyle.c
@@ -612,11 +612,11 @@ int main(int argc, char **argv)
path = wmalloc(strlen(ThemePath) + 32);
strcpy(path, ThemePath);
strcat(path, "/style");
- WMWritePropListToFile(style, path, False);
+ WMWritePropListToFile(style, path);
wfree(path);
} else {
if (style_file) {
- WMWritePropListToFile(style, style_file, False);
+ WMWritePropListToFile(style, style_file);
} else {
puts(WMGetPropListDescription(style, True));
}
diff --git a/util/seticons.c b/util/seticons.c
index 568e0b1..ab5b134 100644
--- a/util/seticons.c
+++ b/util/seticons.c
@@ -135,7 +135,7 @@ int main(int argc, char **argv)
}
}
- WMWritePropListToFile(all_windows, path, True);
+ WMWritePropListToFile(all_windows, path);
exit(0);
}
diff --git a/util/setstyle.c b/util/setstyle.c
index 692fb61..6734ca4 100644
--- a/util/setstyle.c
+++ b/util/setstyle.c
@@ -536,7 +536,7 @@ int main(int argc, char **argv)
WMMergePLDictionaries(prop, style, True);
- WMWritePropListToFile(prop, path, True);
+ WMWritePropListToFile(prop, path);
{
XEvent ev;
diff --git a/util/wdwrite.c b/util/wdwrite.c
index ea686df..34088cd 100644
--- a/util/wdwrite.c
+++ b/util/wdwrite.c
@@ -124,7 +124,7 @@ int main(int argc, char **argv)
WMPutInPLDictionary(dict, key, value);
}
- WMWritePropListToFile(dict, path, True);
+ WMWritePropListToFile(dict, path);
wfree(path);
return 0;
--
1.7.0