diff options
author | Dominik Picheta <dominikpicheta@googlemail.com> | 2014-08-30 12:57:42 +0100 |
---|---|---|
committer | Dominik Picheta <dominikpicheta@googlemail.com> | 2014-08-30 12:57:42 +0100 |
commit | fb4e54442bc9097acd8fbef5023694884aad3ea4 (patch) | |
tree | cfa3bc7e397d62573d78f4749e7e5c8933f28f62 | |
parent | 4a7a47f294314203b66af19b5219ecbb272e3c0b (diff) | |
download | Nim-fb4e54442bc9097acd8fbef5023694884aad3ea4.tar.gz |
Fixed issue with os module in non-unicode mode on Windows.
-rw-r--r-- | lib/pure/os.nim | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/lib/pure/os.nim b/lib/pure/os.nim index c4b694406..8227c92b2 100644 --- a/lib/pure/os.nim +++ b/lib/pure/os.nim @@ -2013,7 +2013,10 @@ proc isHidden*(path: string): bool = ## On Unix-like systems, a file is hidden if it starts with a '.' (period) ## and is not *just* '.' or '..' ' ." when defined(Windows): - wrapUnary(attributes, getFileAttributesW, path) + when useWinUnicode: + wrapUnary(attributes, getFileAttributesW, path) + else: + var attributes = getFileAttributesA(path) if attributes != -1'i32: result = (attributes and FILE_ATTRIBUTE_HIDDEN) != 0'i32 else: |