about summary refs log tree commit diff
path: root/Src
diff options
context:
space:
mode:
Diffstat (limited to 'Src')
-rw-r--r--Src/utils.c4
1 files changed, 3 insertions, 1 deletions
diff --git a/Src/utils.c b/Src/utils.c
index cd7685e6e..9ef3ec88c 100644
--- a/Src/utils.c
+++ b/Src/utils.c
@@ -3839,7 +3839,9 @@ zwcstat(char *filename, struct stat *buf, FuncDump dumps)
     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;