Zsh Mailing List Archive
Messages sorted by:
Reverse Date,
Date,
Thread,
Author
Re: PATCH: check deleted .zwc files
- X-seq: zsh-workers 14815
- From: Clint Adams <clint@xxxxxxx>
- To: Bart Schaefer <schaefer@xxxxxxxxxxxxxxxxxxxxxxx>
- Subject: Re: PATCH: check deleted .zwc files
- Date: Fri, 8 Jun 2001 15:04:45 -0400
- Cc: zsh-workers@xxxxxxxxxx
- In-reply-to: <010608115028.ZM5876@xxxxxxxxxxxxxxxxxxxxxxx>; from schaefer@xxxxxxxxxxxxxxxxxxxxxxx on Fri, Jun 08, 2001 at 11:50:28AM -0700
- Mailing-list: contact zsh-workers-help@xxxxxxxxxx; run by ezmlm
- References: <20010608141719.A4626@xxxxxxxx> <010608115028.ZM5876@xxxxxxxxxxxxxxxxxxxxxxx>
> What happens if the file has been deleted and re-created? zwcstat()
> will return the stat info for the newly-created file, but what will
> autoloading do with the now-obsolete (?) file handle?
Oops. It will do nothing with it, just as it did nothing with it before.
It'll check device/inode against the existing file rather than the
replaced one.
Index: Src/utils.c
===================================================================
RCS file: /cvsroot/zsh/zsh/Src/utils.c,v
retrieving revision 1.31
diff -u -r1.31 utils.c
--- Src/utils.c 2001/06/08 18:34:53 1.31
+++ Src/utils.c 2001/06/08 19:03:05
@@ -3839,7 +3839,9 @@
if (stat(filename, buf)) {
#ifdef HAVE_FSTAT
for (f = dumps; f; f = f->next) {
- if (!fstat(f->fd, buf)) return 0;
+ if (!strncmp(filename, f->filename, strlen(f->filename)) &&
+ !fstat(f->fd, buf))
+ return 0;
}
#endif
return 1;
Messages sorted by:
Reverse Date,
Date,
Thread,
Author