diff options
Diffstat (limited to 'composer')
-rw-r--r-- | composer/ChangeLog | 3 | ||||
-rw-r--r-- | composer/e-msg-composer.c | 8 |
2 files changed, 10 insertions, 1 deletions
diff --git a/composer/ChangeLog b/composer/ChangeLog index 2e3d5cde89..7eb4b14dd7 100644 --- a/composer/ChangeLog +++ b/composer/ChangeLog @@ -1,5 +1,8 @@ 2001-07-03 Larry Ewing <lewing@ximian.com> + * e-msg-composer.c (autosave_save_draft): make sure we seek to the + begining. + * e-msg-composer.h: remove the timer id. * e-msg-composer.c: use autosave manager. 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)); |