summaryrefslogtreecommitdiff
path: root/file.c
diff options
context:
space:
mode:
Diffstat (limited to 'file.c')
-rw-r--r--file.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/file.c b/file.c
index 60d5a94300..ba490c0894 100644
--- a/file.c
+++ b/file.c
@@ -2746,14 +2746,14 @@ file_expand_path(fname, dname, result)
#if USE_NTFS
*p = '\0';
- if (*(s = skipprefix(b = buf)) && !strpbrk(s, "*?")) {
+ if ((s = strrdirsep(b = buf)) != 0 && !strpbrk(s, "*?")) {
size_t len;
WIN32_FIND_DATA wfd;
#ifdef __CYGWIN__
int lnk_added = 0, is_symlink = 0;
struct stat st;
char w32buf[MAXPATHLEN];
- p = strrdirsep(s);
+ p = (char *)s;
if (lstat(buf, &st) == 0 && S_ISLNK(st.st_mode)) {
is_symlink = 1;
*p = '\0';
@@ -2782,7 +2782,7 @@ file_expand_path(fname, dname, result)
wfd.cFileName[len -= 4] = '\0';
}
#else
- p = strrdirsep(s);
+ p = (char *)s;
#endif
++p;
BUFCHECK(bdiff + len >= buflen);