parent
dbbe311e18
commit
a2b2bc1a36
1 changed files with 4 additions and 1 deletions
|
|
@ -449,6 +449,9 @@ proc unixToNativePath*(path: string, drive=""): string {.
|
||||||
when defined(unix):
|
when defined(unix):
|
||||||
result = path
|
result = path
|
||||||
else:
|
else:
|
||||||
|
if path.len == 0:
|
||||||
|
return ""
|
||||||
|
|
||||||
var start: int
|
var start: int
|
||||||
if path[0] == '/':
|
if path[0] == '/':
|
||||||
# an absolute path
|
# an absolute path
|
||||||
|
|
@ -462,7 +465,7 @@ proc unixToNativePath*(path: string, drive=""): string {.
|
||||||
else:
|
else:
|
||||||
result = $DirSep
|
result = $DirSep
|
||||||
start = 1
|
start = 1
|
||||||
elif path[0] == '.' and path[1] == '/':
|
elif path[0] == '.' and (path.len == 1 or path[1] == '/'):
|
||||||
# current directory
|
# current directory
|
||||||
result = $CurDir
|
result = $CurDir
|
||||||
start = 2
|
start = 2
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue