diff options
author | Dominik Picheta <dominikpicheta@googlemail.com> | 2011-11-19 22:44:02 +0000 |
---|---|---|
committer | Dominik Picheta <dominikpicheta@googlemail.com> | 2011-11-19 22:44:02 +0000 |
commit | 9e06495261535777c6c59292ad141cbd3b155b16 (patch) | |
tree | 59a8c80d2108557f8af457828a4a2af1cd7ce90b /lib | |
parent | a274f3bf5be3fc35f1538e5aab0e32fb9ed2ff82 (diff) | |
download | Nim-9e06495261535777c6c59292ad141cbd3b155b16.tar.gz |
Fixed test suite on windows
Diffstat (limited to 'lib')
-rwxr-xr-x | lib/pure/os.nim | 3 | ||||
-rwxr-xr-x | lib/pure/osproc.nim | 2 |
2 files changed, 3 insertions, 2 deletions
diff --git a/lib/pure/os.nim b/lib/pure/os.nim index 2edf999d3..c7e3dccb4 100755 --- a/lib/pure/os.nim +++ b/lib/pure/os.nim @@ -868,7 +868,8 @@ iterator walkDirRec*(dir: string, filter={pcFile, pcDir}): string = proc rawRemoveDir(dir: string) = when defined(windows): - if RemoveDirectoryA(dir) == 0'i32 and GetLastError() != 3'i32: OSError() + if RemoveDirectoryA(dir) != 0'i32 and GetLastError() != 3'i32 and + GetLastError() != 18'i32: OSError() else: if rmdir(dir) != 0'i32 and errno != ENOENT: OSError() diff --git a/lib/pure/osproc.nim b/lib/pure/osproc.nim index 03c3def4d..e01953e85 100755 --- a/lib/pure/osproc.nim +++ b/lib/pure/osproc.nim @@ -131,7 +131,7 @@ proc countProcessors*(): int {.rtl, extern: "nosp$1".} = ## Returns 0 if it cannot be detected. when defined(windows): var x = getenv("NUMBER_OF_PROCESSORS") - if x.len > 0: result = parseInt(x) + if x.len > 0: result = parseInt(x.string) elif defined(macosx) or defined(bsd): var mib: array[0..3, cint] |