From fb4e54442bc9097acd8fbef5023694884aad3ea4 Mon Sep 17 00:00:00 2001 From: Dominik Picheta Date: Sat, 30 Aug 2014 12:57:42 +0100 Subject: Fixed issue with os module in non-unicode mode on Windows. --- lib/pure/os.nim | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) 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: -- cgit 1.4.1-2-gfad0