about summary refs log tree commit diff
path: root/Src
diff options
context:
space:
mode:
Diffstat (limited to 'Src')
-rw-r--r--Src/Zle/compresult.c3
1 files changed, 3 insertions, 0 deletions
diff --git a/Src/Zle/compresult.c b/Src/Zle/compresult.c
index 3875987c5..8c09a9491 100644
--- a/Src/Zle/compresult.c
+++ b/Src/Zle/compresult.c
@@ -705,6 +705,9 @@ ztat(char *nam, struct stat *buf, int ls)
 {
     char b[PATH_MAX], *p;
 
+    if (!(ls ? lstat(nam, buf) : stat(nam, buf)))
+	return 0;
+
     for (p = b; p < b + sizeof(b) - 1 && *nam; nam++)
 	if (*nam == '\\' && nam[1])
 	    *p++ = *++nam;