Skip to content
Permalink
Browse files

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 <johannes.schindelin@gmx.de>
  • Loading branch information...
dscho committed Apr 25, 2018
1 parent e6ee2f7 commit 918fa5c06c9d7f5e8a2d980e4e2744c63b1d7cbd
Showing with 1 addition and 1 deletion.
  1. +1 −1 compat/mingw.c
@@ -3566,7 +3566,7 @@ int file_attr_to_st_mode (DWORD attr, DWORD tag, const char *path)
* points and look like symbolic links, but they are not.
*/
if (path && is_inside_windows_container() &&
!readlink(path, buf, sizeof(buf)) &&
!readlink(path, buf, sizeof(buf) >= 0) &&
starts_with(buf, "/ContainerMappedDirectories/"))
flag = S_IFDIR;

0 comments on commit 918fa5c

Please sign in to comment.
You can’t perform that action at this time.