diff options
Diffstat (limited to 'composer/e-msg-composer.c')
-rw-r--r-- | composer/e-msg-composer.c | 8 |
1 files changed, 7 insertions, 1 deletions
diff --git a/composer/e-msg-composer.c b/composer/e-msg-composer.c index 9aac0ace6e..160e45127c 100644 --- a/composer/e-msg-composer.c +++ b/composer/e-msg-composer.c @@ -1012,7 +1012,7 @@ autosave_save_draft (EMsgComposer *composer) if (fd == -1) { e_notice (GTK_WINDOW (composer), GNOME_MESSAGE_BOX_ERROR, - _("Error opening file: %s"), file); + _("Error accessing file: %s"), file); return; } @@ -1024,6 +1024,12 @@ autosave_save_draft (EMsgComposer *composer) return; } + if (lseek (fd, (off_t)0, SEEK_SET) == -1) { + e_notice (GTK_WINDOW (composer), GNOME_MESSAGE_BOX_ERROR, + _("Unable to seek on file: %s\n%s"), file, strerror(errno)); + return; + } + if (ftruncate (fd, (off_t)0) == -1) { e_notice (GTK_WINDOW (composer), GNOME_MESSAGE_BOX_ERROR, _("Unable to truncate file: %s\n%s"), file, strerror(errno)); |