open the file with O_TRUNC.

2002-03-17  Sven Neumann  <sven@gimp.org>

	* app/config/gimpconfig.c: open the file with O_TRUNC.
This commit is contained in:
Sven Neumann 2002-03-17 17:04:38 +00:00 committed by Sven Neumann
parent 7aaa80ef06
commit 30e4242936
3 changed files with 6 additions and 2 deletions

View file

@ -1,3 +1,7 @@
2002-03-17 Sven Neumann <sven@gimp.org>
* app/config/gimpconfig.c: open the file with O_TRUNC.
2002-03-17 Sven Neumann <sven@gimp.org>
* libgimpwidgets/gimpwidgets.[ch]: new function to set the sensitivity

View file

@ -116,7 +116,7 @@ gimp_config_serialize (GObject *object,
g_return_val_if_fail (gimp_config_iface != NULL, FALSE);
fd = open (filename, O_WRONLY | O_CREAT,
fd = open (filename, O_WRONLY | O_CREAT | O_TRUNC,
#ifndef G_OS_WIN32
S_IRUSR | S_IWUSR | S_IRGRP | S_IROTH);
#else

View file

@ -116,7 +116,7 @@ gimp_config_serialize (GObject *object,
g_return_val_if_fail (gimp_config_iface != NULL, FALSE);
fd = open (filename, O_WRONLY | O_CREAT,
fd = open (filename, O_WRONLY | O_CREAT | O_TRUNC,
#ifndef G_OS_WIN32
S_IRUSR | S_IWUSR | S_IRGRP | S_IROTH);
#else