diff options
Diffstat (limited to 'src/dired.c')
| -rw-r--r-- | src/dired.c | 17 |
1 files changed, 16 insertions, 1 deletions
diff --git a/src/dired.c b/src/dired.c index bdb71c46364..85af906c1da 100644 --- a/src/dired.c +++ b/src/dired.c | |||
| @@ -895,6 +895,7 @@ so last access time will always be midnight of that day. */) | |||
| 895 | Lisp_Object dirname; | 895 | Lisp_Object dirname; |
| 896 | struct stat sdir; | 896 | struct stat sdir; |
| 897 | #endif /* BSD4_2 */ | 897 | #endif /* BSD4_2 */ |
| 898 | int lstat_result; | ||
| 898 | 899 | ||
| 899 | /* An array to hold the mode string generated by filemodestring, | 900 | /* An array to hold the mode string generated by filemodestring, |
| 900 | including its terminating space and null byte. */ | 901 | including its terminating space and null byte. */ |
| @@ -922,7 +923,21 @@ so last access time will always be midnight of that day. */) | |||
| 922 | encoded = ENCODE_FILE (filename); | 923 | encoded = ENCODE_FILE (filename); |
| 923 | UNGCPRO; | 924 | UNGCPRO; |
| 924 | 925 | ||
| 925 | if (lstat (SSDATA (encoded), &s) < 0) | 926 | #ifdef WINDOWSNT |
| 927 | /* We usually don't request accurate owner and group info, because | ||
| 928 | it can be very expensive on Windows to get that, and most callers | ||
| 929 | of 'lstat' don't need that. But here we do want that information | ||
| 930 | to be accurate. */ | ||
| 931 | w32_stat_get_owner_group = 1; | ||
| 932 | #endif | ||
| 933 | |||
| 934 | lstat_result = lstat (SSDATA (encoded), &s); | ||
| 935 | |||
| 936 | #ifdef WINDOWSNT | ||
| 937 | w32_stat_get_owner_group = 0; | ||
| 938 | #endif | ||
| 939 | |||
| 940 | if (lstat_result < 0) | ||
| 926 | return Qnil; | 941 | return Qnil; |
| 927 | 942 | ||
| 928 | values[0] = (S_ISLNK (s.st_mode) ? Ffile_symlink_p (filename) | 943 | values[0] = (S_ISLNK (s.st_mode) ? Ffile_symlink_p (filename) |