summary refs log tree commit diff stats
diff options
context:
space:
mode:
authorDominik Picheta <dominikpicheta@googlemail.com>2015-06-14 20:25:17 +0100
committerDominik Picheta <dominikpicheta@googlemail.com>2015-06-14 20:25:17 +0100
commit9ed4efc1f8c391efc51a6a08498281764ba75040 (patch)
tree1848faf50760835411835132b5ebe86a1dc2d43c
parent0e4e187476ce54aef699d0767c5fe3574688eba4 (diff)
parent059b05a804b50a590fd0d02894a599e86e9f47d0 (diff)
downloadNim-9ed4efc1f8c391efc51a6a08498281764ba75040.tar.gz
Merge pull request #2925 from HaCk3Dq/devel
Fixed #1985
-rw-r--r--lib/pure/os.nim4
1 files changed, 3 insertions, 1 deletions
diff --git a/lib/pure/os.nim b/lib/pure/os.nim
index 4deb79f86..f29505590 100644
--- a/lib/pure/os.nim
+++ b/lib/pure/os.nim
@@ -1304,7 +1304,9 @@ iterator walkDir*(dir: string): tuple[kind: PathComponent, path: string] {.
           when defined(linux) or defined(macosx) or defined(bsd):
             if x.d_type != DT_UNKNOWN:
               if x.d_type == DT_DIR: k = pcDir
-              if x.d_type == DT_LNK: k = succ(k)
+              if x.d_type == DT_LNK:
+                if dirExists(y): k = pcLinkToDir
+                else: k = succ(k)
               yield (k, y)
               continue