# HG changeset patch # User Mark Doliner # Date 1051513792 0 # Node ID d11cb52d530925305476e62f155a0e2221491daa # Parent 649e54d617da42acb1824805085f1a2dff14cc7c [gaim-migrate @ 5623] KingAnt: Err, shouldn't you rename after you close the file? committer: Tailor Script diff -r 649e54d617da -r d11cb52d5309 src/gaimrc.c --- a/src/gaimrc.c Mon Apr 28 06:49:07 2003 +0000 +++ b/src/gaimrc.c Mon Apr 28 07:09:52 2003 +0000 @@ -1587,13 +1587,15 @@ gaimrc_write_proxy(f); if (fprintf(f, "\n") == 1) { + fclose(f); if (rename(filename_temp, filename) < 0) gaim_debug(GAIM_DEBUG_ERROR, "gaimrc", "Error renaming %s to %s\n", filename_temp, filename); - } else + } else { + fclose(f); gaim_debug(GAIM_DEBUG_ERROR, "gaimrc", "Unable to create new .gaimrc file. Preferences not updated."); - fclose(f); + } is_saving_prefs = 0; } else gaim_debug(GAIM_DEBUG_ERROR, "gaimrc",