summary refs log tree commit diff stats
diff options
context:
space:
mode:
authorVlad <vladstudio@rambler.ru>2015-06-14 21:42:43 +0300
committerVlad <vladstudio@rambler.ru>2015-06-14 21:42:43 +0300
commit059b05a804b50a590fd0d02894a599e86e9f47d0 (patch)
tree68cc73fbfe4fb9b1a14cfcc5b620c27c280b62bf
parent2f68b0baf0c7b70c511a9988640ebd946f2408c0 (diff)
downloadNim-059b05a804b50a590fd0d02894a599e86e9f47d0.tar.gz
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