diff options
Diffstat (limited to 'commands.c')
-rw-r--r-- | commands.c | 7 |
1 files changed, 5 insertions, 2 deletions
@@ -477,7 +477,10 @@ delete_target (file, on_behalf_of) #ifndef NO_ARCHIVES if (ar_name (file->name)) { - if (ar_member_date (file->name) != FILE_TIMESTAMP_S (file->last_mtime)) + time_t file_date = (file->last_mtime == NONEXISTENT_MTIME + ? (time_t) -1 + : (time_t) FILE_TIMESTAMP_S (file->last_mtime)); + if (ar_member_date (file->name) != file_date) { if (on_behalf_of) error (NILF, _("*** [%s] Archive member `%s' may be bogus; not deleted"), @@ -492,7 +495,7 @@ delete_target (file, on_behalf_of) if (stat (file->name, &st) == 0 && S_ISREG (st.st_mode) - && FILE_TIMESTAMP_STAT_MODTIME (st) != file->last_mtime) + && FILE_TIMESTAMP_STAT_MODTIME (file->name, st) != file->last_mtime) { if (on_behalf_of) error (NILF, _("*** [%s] Deleting file `%s'"), on_behalf_of, file->name); |