Branch: refs/heads/master
Author: Nick Treleaven <nick.treleaven(a)btinternet.com>
Committer: Nick Treleaven <nick.treleaven(a)btinternet.com>
Date: Thu, 26 Jan 2012 15:42:06
Commit: 7cc443e1420b77d041815a464fe5b20bc62412f4
https://github.com/geany/geany/commit/7cc443e1420b77d041815a464fe5b20bc6241…
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))
{
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).