diff options
author | Andreas Rumpf <rumpf_a@web.de> | 2015-05-13 16:33:56 +0200 |
---|---|---|
committer | Andreas Rumpf <rumpf_a@web.de> | 2015-05-13 16:33:56 +0200 |
commit | ce2756dd899fadac174223363c003a4f6e704f4d (patch) | |
tree | 60f21d4f55f5a396dcfdfc43421d19403faafa37 | |
parent | 0b184f2584221543a7dec9c8ae4a700533919e0c (diff) | |
parent | 28dd0407bbee1bbbfeec92e60f3836d3845a09d6 (diff) | |
download | Nim-ce2756dd899fadac174223363c003a4f6e704f4d.tar.gz |
Merge pull request #2707 from rbehrends/fix-getfileinfo-links
Fix behavior of os.getFileInfo() for symbolic links.
-rw-r--r-- | lib/pure/os.nim | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/lib/pure/os.nim b/lib/pure/os.nim index f53abe81d..3a5bcbfa1 100644 --- a/lib/pure/os.nim +++ b/lib/pure/os.nim @@ -2033,10 +2033,10 @@ proc getFileInfo*(path: string, followSymlink = true): FileInfo = else: var rawInfo: TStat if followSymlink: - if lstat(path, rawInfo) < 0'i32: + if stat(path, rawInfo) < 0'i32: raiseOSError(osLastError()) else: - if stat(path, rawInfo) < 0'i32: + if lstat(path, rawInfo) < 0'i32: raiseOSError(osLastError()) rawToFormalFileInfo(rawInfo, result) |