changeset 13585:ffb12e85473f

[gaim-migrate @ 15970] gaim_util_write_data_to_file() should not be unlink()ing the target before rename()ing the temporary file over top of the target. rename() will remove the target, if it exists. committer: Tailor Script <tailor@pidgin.im>
author Richard Laager <rlaager@wiktel.com>
date Wed, 05 Apr 2006 02:10:39 +0000
parents 097ae11c67e0
children 0cc7773b1d87
files src/util.c
diffstat 1 files changed, 0 insertions(+), 10 deletions(-) [+]
line wrap: on
line diff
--- a/src/util.c	Tue Apr 04 23:54:19 2006 +0000
+++ b/src/util.c	Wed Apr 05 02:10:39 2006 +0000
@@ -2380,16 +2380,6 @@
 	}
 #endif
 
-	/* Remove the old file, if it exists */
-	if (g_file_test(filename_full, G_FILE_TEST_EXISTS))
-	{
-		if (g_unlink(filename_full) == -1)
-		{
-			gaim_debug_error("util", "Error removing old file %s: %s\n",
-							 filename_full, strerror(errno));
-		}
-	}
-
 	/* Rename to the REAL name */
 	if (g_rename(filename_temp, filename_full) == -1)
 	{