Skip to content

Commit 918fa5c

Browse files
committed
fixup! mingw: Windows Docker volumes are *not* symbolic links
A quick fix: upon success, readlink() returns a non-negative value (not 0, as the code expected). Signed-off-by: Johannes Schindelin <[email protected]>
1 parent e6ee2f7 commit 918fa5c

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

compat/mingw.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3566,7 +3566,7 @@ int file_attr_to_st_mode (DWORD attr, DWORD tag, const char *path)
35663566
* points and look like symbolic links, but they are not.
35673567
*/
35683568
if (path && is_inside_windows_container() &&
3569-
!readlink(path, buf, sizeof(buf)) &&
3569+
!readlink(path, buf, sizeof(buf) >= 0) &&
35703570
starts_with(buf, "/ContainerMappedDirectories/"))
35713571
flag = S_IFDIR;
35723572

0 commit comments

Comments
 (0)