summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorRoland McGrath <roland@redhat.com>1993-12-14 21:06:33 +0000
committerRoland McGrath <roland@redhat.com>1993-12-14 21:06:33 +0000
commit21eecea26d5ee3d556f6e205982741ac09effe06 (patch)
treee64edb1a72e48f4663b693e1aa383ffe80edb9ef
parentd519e2c19be51b628b3d505cea77b8fb98798e0a (diff)
downloadgunmake-21eecea26d5ee3d556f6e205982741ac09effe06.tar.gz
Formerly ar.c.~6~
-rw-r--r--ar.c15
1 files changed, 10 insertions, 5 deletions
diff --git a/ar.c b/ar.c
index 29ee43b..c1fda06 100644
--- a/ar.c
+++ b/ar.c
@@ -83,19 +83,24 @@ ar_member_date (name)
ar_parse_name (name, &arname, &memname);
- /* Make sure we know the modtime of the archive itself because
- we are likely to be called just before commands to remake a
- member are run, and they will change the archive itself. */
+ /* Make sure we know the modtime of the archive itself because we are
+ likely to be called just before commands to remake a member are run,
+ and they will change the archive itself.
+
+ But we must be careful not to enter_file the archive itself if it does
+ not exist, because pattern_search assumes that files found in the data
+ base exist or can be made. */
{
struct file *arfile;
arfile = lookup_file (arname);
- if (arfile == 0)
+ if (arfile == 0 && file_exists_p (arname))
{
arfile = enter_file (arname);
arname_used = 1;
}
- (void) f_mtime (arfile, 0);
+ if (arfile != 0)
+ (void) f_mtime (arfile, 0);
}
val = ar_scan (arname, ar_member_date_1, (long int) memname);