Revision: 5771 http://geany.svn.sourceforge.net/geany/?rev=5771&view=rev Author: eht16 Date: 2011-05-08 17:05:21 +0000 (Sun, 08 May 2011)
Log Message: ----------- Fix wrong warning on empty backup directory setting if 'Backup Copy' is not enabled at all.
Modified Paths: -------------- branches/0.20.1/ChangeLog branches/0.20.1/plugins/saveactions.c
Modified: branches/0.20.1/ChangeLog =================================================================== --- branches/0.20.1/ChangeLog 2011-05-08 17:03:33 UTC (rev 5770) +++ branches/0.20.1/ChangeLog 2011-05-08 17:05:21 UTC (rev 5771) @@ -16,6 +16,9 @@ Improve error checking when trying to write project files (patch by Colomban Wendling, thanks). Add a warning if writing the project file fails on close. + * plugins/saveactions.c: + Fix wrong warning on empty backup directory setting if + 'Backup Copy' is not enabled at all.
2011-01-05 Nick Treleaven <nick(dot)treleaven(at)btinternet(dot)com>
Modified: branches/0.20.1/plugins/saveactions.c =================================================================== --- branches/0.20.1/plugins/saveactions.c 2011-05-08 17:03:33 UTC (rev 5770) +++ branches/0.20.1/plugins/saveactions.c 2011-05-08 17:05:21 UTC (rev 5771) @@ -453,15 +453,18 @@ g_key_file_set_integer(config, "backupcopy", "dir_levels", backupcopy_dir_levels); g_key_file_set_string(config, "backupcopy", "time_fmt", text_time); setptr(backupcopy_time_fmt, g_strdup(text_time)); - if (*text_dir != '\0' && backupcopy_set_backup_dir(text_dir)) + if (enable_backupcopy) { - g_key_file_set_string(config, "backupcopy", "backup_dir", text_dir); + if (NZV(text_dir) && backupcopy_set_backup_dir(text_dir)) + { + g_key_file_set_string(config, "backupcopy", "backup_dir", text_dir); + } + else + { + dialogs_show_msgbox(GTK_MESSAGE_ERROR, + _("Backup directory does not exist or is not writable.")); + } } - else - { - dialogs_show_msgbox(GTK_MESSAGE_ERROR, - _("Backup directory does not exist or is not writable.")); - }
if (! g_file_test(config_dir, G_FILE_TEST_IS_DIR) && utils_mkdir(config_dir, TRUE) != 0)
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.