]> git.ipfire.org Git - thirdparty/git.git/blobdiff - compat/mingw.c
Merge branch 'js/lstat-mingw-enotdir-fix'
[thirdparty/git.git] / compat / mingw.c
index b5502997e2dce6f98890e790733b7d387ccaf25c..c5ca4eb4a9a9263777a8b2285d047a3850fd6289 100644 (file)
@@ -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()) {