On Fri, Jan 27, 2012 at 2:42 AM, Nick Treleaven git-noreply@geany.org wrote:
Branch: refs/heads/master Author: Nick Treleaven nick.treleaven@btinternet.com Committer: Nick Treleaven nick.treleaven@btinternet.com Date: Thu, 26 Jan 2012 15:42:06 Commit: 7cc443e1420b77d041815a464fe5b20bc62412f4 https://github.com/geany/geany/commit/7cc443e1420b77d041815a464fe5b20bc62412...
Log Message:
Don't append file truncation warning if file doesn't exist
This warning shown after a failed save is unnecessary when the filename is invalid.
Modified Paths:
src/document.c
Modified: src/document.c 3 files changed, 2 insertions(+), 1 deletions(-) =================================================================== @@ -1766,7 +1766,8 @@ gboolean document_save_file(GeanyDocument *doc, gboolean force) { ui_set_statusbar(TRUE, _("Error saving file (%s)."), errmsg);
- if (!file_prefs.use_safe_file_saving)
- if (!file_prefs.use_safe_file_saving &&
- g_file_test(locale_filename, G_FILE_TEST_IS_REGULAR))
Hi Nick,
If writing a remote file failed half way because of a network failure, then if the network is still faulty when we g_file_test for a regular file, it will fail because the file doesn't exist, but the partly written file may (is likely to) be truncated.
Cheers Lex
{ SETPTR(errmsg, g_strdup_printf(_("%s\n\nThe file on disk may now be truncated!"), errmsg));
This E-Mail was brought to you by github_commit_mail.py (Source: TBD). _______________________________________________ Geany-commits mailing list Geany-commits@uvena.de https://lists.uvena.de/cgi-bin/mailman/listinfo/geany-commits