-rw-r--r-- | kmicromail/libetpan/mh/mailmh.c | 12 |
1 files changed, 8 insertions, 4 deletions
diff --git a/kmicromail/libetpan/mh/mailmh.c b/kmicromail/libetpan/mh/mailmh.c index 119f217..5e2b4cc 100644 --- a/kmicromail/libetpan/mh/mailmh.c +++ b/kmicromail/libetpan/mh/mailmh.c | |||
@@ -609,2 +609,3 @@ static int mailmh_folder_alloc_msg(struct mailmh_folder * folder, | |||
609 | size_t len; | 609 | size_t len; |
610 | struct stat f_stat; | ||
610 | 611 | ||
@@ -617,2 +618,3 @@ static int mailmh_folder_alloc_msg(struct mailmh_folder * folder, | |||
617 | 618 | ||
619 | //fprintf(stderr,"mailmh_folder_alloc_msg filename: %s \n", filename); | ||
618 | k = 0; | 620 | k = 0; |
@@ -621,8 +623,10 @@ static int mailmh_folder_alloc_msg(struct mailmh_folder * folder, | |||
621 | MAIL_DIR_SEPARATOR, (unsigned long) (max + k)); | 623 | MAIL_DIR_SEPARATOR, (unsigned long) (max + k)); |
622 | 624 | //fprintf(stderr,"mailmh_folder_alloc_msg new_filename: %s \n", new_filename); | |
623 | if (link(filename, new_filename) == 0) { | 625 | if ( stat( new_filename, &f_stat ) == -1 ) { |
626 | // if (link(filename, new_filename) == 0) { | ||
624 | int r; | 627 | int r; |
625 | 628 | //fprintf(stderr,"filename found \n"); | |
629 | //unlink(filename); | ||
630 | rename (filename,new_filename ); | ||
626 | free(new_filename); | 631 | free(new_filename); |
627 | unlink(filename); | ||
628 | 632 | ||