author | zautrix <zautrix> | 2005-03-18 22:05:02 (UTC) |
---|---|---|
committer | zautrix <zautrix> | 2005-03-18 22:05:02 (UTC) |
commit | 297208a61298fceab6d96bbd1c46198b1c0f7a76 (patch) (side-by-side diff) | |
tree | 50f0c6f775393c1eec15b71691a798d1dacab86d /libetpan/src/low-level/maildir/maildir.c | |
parent | f0232b7801f098b5842e3cd5a1fd804af98ab862 (diff) | |
download | kdepimpi-297208a61298fceab6d96bbd1c46198b1c0f7a76.zip kdepimpi-297208a61298fceab6d96bbd1c46198b1c0f7a76.tar.gz kdepimpi-297208a61298fceab6d96bbd1c46198b1c0f7a76.tar.bz2 |
fixes applied
Diffstat (limited to 'libetpan/src/low-level/maildir/maildir.c') (more/less context) (show whitespace changes)
-rw-r--r-- | libetpan/src/low-level/maildir/maildir.c | 15 |
1 files changed, 14 insertions, 1 deletions
diff --git a/libetpan/src/low-level/maildir/maildir.c b/libetpan/src/low-level/maildir/maildir.c index 98b9f87..e81625d 100644 --- a/libetpan/src/low-level/maildir/maildir.c +++ b/libetpan/src/low-level/maildir/maildir.c @@ -111,4 +111,6 @@ static char * maildir_get_new_message_filename(struct maildir * md, int k; time_t now; + //LR + struct stat f_stat; int got_file; int r; @@ -123,4 +125,15 @@ static char * maildir_get_new_message_filename(struct maildir * md, md->mdir_path, basename); + // LR changed following lines + if ( stat( filename, &f_stat ) == -1 ) { + char * dup_filename; + + dup_filename = strdup(filename); + if (dup_filename == NULL) { + //unlink(filename); + return NULL; + } + rename (tmpfile,dup_filename ); +#if 0 if (link(tmpfile, filename) == 0) { got_file = 1; @@ -148,5 +161,5 @@ static char * maildir_get_new_message_filename(struct maildir * md, return NULL; } - +#endif md->mdir_counter ++; |