gaim/gaim

Parents 0391ff3d85ef
Children d411cd97b727
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.
  • +0 -10
    src/util.c
  • --- a/src/util.c Tue Apr 04 19:54:19 2006 -0400
    +++ b/src/util.c Tue Apr 04 22:10:39 2006 -0400
    @@ -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)
    {