mirror of
https://github.com/git/git.git
synced 2024-11-30 13:33:44 +08:00
Merge branch 'js/lstat-mingw-enotdir-fix'
Fix to lstat() emulation on Windows. * js/lstat-mingw-enotdir-fix: lstat(mingw): correctly detect ENOTDIR scenarios
This commit is contained in:
commit
6c5fbd866c
@ -768,8 +768,8 @@ static int has_valid_directory_prefix(wchar_t *wfilename)
|
||||
wfilename[n] = L'\0';
|
||||
attributes = GetFileAttributesW(wfilename);
|
||||
wfilename[n] = c;
|
||||
if (attributes == FILE_ATTRIBUTE_DIRECTORY ||
|
||||
attributes == FILE_ATTRIBUTE_DEVICE)
|
||||
if (attributes &
|
||||
(FILE_ATTRIBUTE_DIRECTORY | FILE_ATTRIBUTE_DEVICE))
|
||||
return 1;
|
||||
if (attributes == INVALID_FILE_ATTRIBUTES)
|
||||
switch (GetLastError()) {
|
||||
|
Loading…
Reference in New Issue
Block a user