diff options
| author | Eli Zaretskii | 2017-08-25 17:43:15 +0300 |
|---|---|---|
| committer | Eli Zaretskii | 2017-08-25 17:43:15 +0300 |
| commit | 0d2b4093984f0927b4fb07de971bd7e077fee93c (patch) | |
| tree | e9b2566025415a70353c27da07e6bb5c9d56d1cb /src | |
| parent | 690512d2af16370097cf646764e86caf8a27eade (diff) | |
| download | emacs-0d2b4093984f0927b4fb07de971bd7e077fee93c.tar.gz emacs-0d2b4093984f0927b4fb07de971bd7e077fee93c.zip | |
Fix file-name completion on network shares
* src/w32.c (faccessat): Don't assume that F_OK is non-zero.
(Bug#28207)
Diffstat (limited to 'src')
| -rw-r--r-- | src/w32.c | 4 |
1 files changed, 3 insertions, 1 deletions
| @@ -3908,7 +3908,9 @@ faccessat (int dirfd, const char * path, int mode, int flags) | |||
| 3908 | path = fullname; | 3908 | path = fullname; |
| 3909 | } | 3909 | } |
| 3910 | 3910 | ||
| 3911 | if (IS_DIRECTORY_SEP (path[strlen (path) - 1]) && (mode & F_OK) != 0) | 3911 | /* When dired.c calls us with F_OK and a trailing slash, it actually |
| 3912 | wants to know whether PATH is a directory. */ | ||
| 3913 | if (IS_DIRECTORY_SEP (path[strlen (path) - 1]) && ((mode & F_OK) == F_OK)) | ||
| 3912 | mode |= D_OK; | 3914 | mode |= D_OK; |
| 3913 | 3915 | ||
| 3914 | /* MSVCRT implementation of 'access' doesn't recognize D_OK, and its | 3916 | /* MSVCRT implementation of 'access' doesn't recognize D_OK, and its |