Mercurial > pidgin
comparison src/prefs.c @ 8549:1a016d979ce0
[gaim-migrate @ 9291]
if we can't write a file, we certainly shouldn't toast the file we have
committer: Tailor Script <tailor@pidgin.im>
author | Nathan Walp <nwalp@pidgin.im> |
---|---|
date | Thu, 01 Apr 2004 21:24:17 +0000 |
parents | ef881489396e |
children | d99d2572d1a9 |
comparison
equal
deleted
inserted
replaced
8548:fae482a76700 | 8549:1a016d979ce0 |
---|---|
773 fclose(file); | 773 fclose(file); |
774 chmod(filename, S_IRUSR | S_IWUSR); | 774 chmod(filename, S_IRUSR | S_IWUSR); |
775 } else { | 775 } else { |
776 gaim_debug(GAIM_DEBUG_ERROR, "prefs", "Unable to write %s\n", | 776 gaim_debug(GAIM_DEBUG_ERROR, "prefs", "Unable to write %s\n", |
777 filename); | 777 filename); |
778 g_free(filename); | |
779 return; | |
778 } | 780 } |
779 | 781 |
780 filename_real = g_build_filename(user_dir, "prefs.xml", NULL); | 782 filename_real = g_build_filename(user_dir, "prefs.xml", NULL); |
781 if(rename(filename, filename_real) < 0) | 783 if(rename(filename, filename_real) < 0) |
782 gaim_debug(GAIM_DEBUG_ERROR, "prefs", "Error renaming %s to %s\n", | 784 gaim_debug(GAIM_DEBUG_ERROR, "prefs", "Error renaming %s to %s\n", |