comparison src/gaimrc.c @ 5080:0e639df44fb5

[gaim-migrate @ 5434] security is good, mmmkay? committer: Tailor Script <tailor@pidgin.im>
author Nathan Walp <nwalp@pidgin.im>
date Tue, 08 Apr 2003 03:52:29 +0000
parents 5078f765e3f9
children a96653493416
comparison
equal deleted inserted replaced
5079:6e02fa68d5e1 5080:0e639df44fb5
1562 else 1562 else
1563 return; 1563 return;
1564 filename_temp = g_strdup_printf("%s.save", filename); 1564 filename_temp = g_strdup_printf("%s.save", filename);
1565 1565
1566 if ((f = fopen(filename_temp, "w"))) { 1566 if ((f = fopen(filename_temp, "w"))) {
1567 chmod(filename_temp, S_IRUSR | S_IWUSR);
1567 is_saving_prefs = 1; 1568 is_saving_prefs = 1;
1568 fprintf(f, "# .gaimrc v%d\n", 4); 1569 fprintf(f, "# .gaimrc v%d\n", 4);
1569 gaimrc_write_users(f); 1570 gaimrc_write_users(f);
1570 gaimrc_write_options(f); 1571 gaimrc_write_options(f);
1571 gaimrc_write_sounds(f); 1572 gaimrc_write_sounds(f);
1574 #ifdef GAIM_PLUGINS 1575 #ifdef GAIM_PLUGINS
1575 gaimrc_write_plugins(f); 1576 gaimrc_write_plugins(f);
1576 #endif 1577 #endif
1577 gaimrc_write_proxy(f); 1578 gaimrc_write_proxy(f);
1578 fclose(f); 1579 fclose(f);
1579 chmod(filename, S_IRUSR | S_IWUSR);
1580 if (rename(filename_temp, filename) < 0) 1580 if (rename(filename_temp, filename) < 0)
1581 debug_printf("error renaming %s to %s\n", filename_temp, filename); 1581 debug_printf("error renaming %s to %s\n", filename_temp, filename);
1582 is_saving_prefs = 0; 1582 is_saving_prefs = 0;
1583 } else 1583 } else
1584 debug_printf("error opening %s\n", filename_temp); 1584 debug_printf("error opening %s\n", filename_temp);