Fixed issue with os module in non-unicode mode on Windows.
This commit is contained in:
parent
4a7a47f294
commit
fb4e54442b
1 changed files with 4 additions and 1 deletions
|
|
@ -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):
|
||||
when useWinUnicode:
|
||||
wrapUnary(attributes, getFileAttributesW, path)
|
||||
else:
|
||||
var attributes = getFileAttributesA(path)
|
||||
if attributes != -1'i32:
|
||||
result = (attributes and FILE_ATTRIBUTE_HIDDEN) != 0'i32
|
||||
else:
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue