Fix os.unixToNativePath proc returns wrong result(#8179) (#8181)

* Fix os.unixToNativePath proc returns wrong result(#8179)

* Add tests for unixToNativePath
This commit is contained in:
Tomohiro 2018-07-03 00:14:26 +09:00 • committed by Andreas Rumpf
commit c79f488027
2 changed files with 42 additions and 1 deletions

View file

@ -468,7 +468,7 @@ proc unixToNativePath*(path: string, drive=""): string {.
elif path[0] == '.' and (path.len == 1 or path[1] == '/'):
# current directory
result = $CurDir
start = 2
start = when doslikeFileSystem: 1 else: 2
else:
result = ""
start = 0