diff options
author | Jeffrey Stedfast <fejj@ximian.com> | 2004-01-17 00:02:43 +0800 |
---|---|---|
committer | Jeffrey Stedfast <fejj@src.gnome.org> | 2004-01-17 00:02:43 +0800 |
commit | c9102b383c917a1dd5ffa202e59ccfe4fe4c3f7d (patch) | |
tree | 4084b34e6930c4663b01d0b7e9b744e1577f2635 /mail | |
parent | 5402231287a5ec4b4a3d7b86b20522732af5e783 (diff) | |
download | gsoc2013-evolution-c9102b383c917a1dd5ffa202e59ccfe4fe4c3f7d.tar gsoc2013-evolution-c9102b383c917a1dd5ffa202e59ccfe4fe4c3f7d.tar.gz gsoc2013-evolution-c9102b383c917a1dd5ffa202e59ccfe4fe4c3f7d.tar.bz2 gsoc2013-evolution-c9102b383c917a1dd5ffa202e59ccfe4fe4c3f7d.tar.lz gsoc2013-evolution-c9102b383c917a1dd5ffa202e59ccfe4fe4c3f7d.tar.xz gsoc2013-evolution-c9102b383c917a1dd5ffa202e59ccfe4fe4c3f7d.tar.zst gsoc2013-evolution-c9102b383c917a1dd5ffa202e59ccfe4fe4c3f7d.zip |
Oops, still need to stat() the src file so we can report what percentage
2004-01-16 Jeffrey Stedfast <fejj@ximian.com>
* em-migrate.c (cp): Oops, still need to stat() the src file so we
can report what percentage of the file has been completed so far.
svn path=/trunk/; revision=24274
Diffstat (limited to 'mail')
-rw-r--r-- | mail/ChangeLog | 3 | ||||
-rw-r--r-- | mail/em-migrate.c | 5 |
2 files changed, 7 insertions, 1 deletions
diff --git a/mail/ChangeLog b/mail/ChangeLog index 08478f7f29..b1cd112795 100644 --- a/mail/ChangeLog +++ b/mail/ChangeLog @@ -1,5 +1,8 @@ 2004-01-16 Jeffrey Stedfast <fejj@ximian.com> + * em-migrate.c (cp): Oops, still need to stat() the src file so we + can report what percentage of the file has been completed so far. + * message-list.c (message_list_set_folder): Move 'message_list->folder = folder;' out of the uri compare if-block and move it into the if-block that tests that folder != NULL. diff --git a/mail/em-migrate.c b/mail/em-migrate.c index f7610b7e27..26c3c9c566 100644 --- a/mail/em-migrate.c +++ b/mail/em-migrate.c @@ -1248,10 +1248,13 @@ cp (const char *src, const char *dest, gboolean show_progress) if (stat (dest, &st) == 0 && st.st_size > 0) return -1; + if (stat (src, &st) == -1) + return -1; + if ((fd[0] = open (src, O_RDONLY)) == -1) return -1; - if ((fd[1] = open (dest, O_WRONLY | O_CREAT, 0666)) == -1) { + if ((fd[1] = open (dest, O_WRONLY | O_CREAT | O_TRUNC, 0666)) == -1) { errnosav = errno; close (fd[0]); errno = errnosav; |