summaryrefslogtreecommitdiffstats
path: root/src/filepath.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/filepath.c')
-rw-r--r--src/filepath.c6
1 files changed, 5 insertions, 1 deletions
diff --git a/src/filepath.c b/src/filepath.c
index 9f68d7c688..788d3bbe5b 100644
--- a/src/filepath.c
+++ b/src/filepath.c
@@ -3645,11 +3645,15 @@ dos_expandpath(
}
else
{
+ stat_T sb;
+
// no more wildcards, check if there is a match
// remove backslashes for the remaining components only
if (*path_end != 0)
backslash_halve(buf + len + 1);
- if (mch_getperm(buf) >= 0) // add existing file
+ // add existing file
+ if ((flags & EW_ALLLINKS) ? mch_lstat((char *)buf, &sb) >= 0
+ : mch_getperm(buf) >= 0)
addfile(gap, buf, flags);
}
}