From 4972b017b63f3ce324bfa65a1b46a2a173baf463 Mon Sep 17 00:00:00 2001 From: Paul Smith Date: Tue, 13 Jun 2000 05:22:52 +0000 Subject: * Some timestamp fixes from Paul Eggert. * Fix compilation on Linux; use libintl.h and not gettext.h when using the system gettext. --- commands.c | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) (limited to 'commands.c') diff --git a/commands.c b/commands.c index df4a447..156fe06 100644 --- a/commands.c +++ b/commands.c @@ -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); -- cgit v1.2.3