Fix windows paths
This commit is contained in:
parent
2e894dc907
commit
f5e8535ce8
1 changed files with 2 additions and 3 deletions
|
|
@ -225,8 +225,7 @@ proc search(file: string): string =
|
||||||
quit(1)
|
quit(1)
|
||||||
|
|
||||||
# Only keep relative directory
|
# Only keep relative directory
|
||||||
result = result.replace(gProjectDir & $DirSep, "")
|
return result.multiReplace([("\\", $DirSep), ("//", $DirSep), (gProjectDir & $DirSep, "")])
|
||||||
return result.replace(re"[\\/]", $DirSep)
|
|
||||||
|
|
||||||
# ###
|
# ###
|
||||||
# Loading / unloading
|
# Loading / unloading
|
||||||
|
|
@ -389,7 +388,7 @@ proc getIncls(file: string, inline=false): seq[string] =
|
||||||
# OSError if the file does not exist
|
# OSError if the file does not exist
|
||||||
let
|
let
|
||||||
finc = expandFileName(curPath / addInc)
|
finc = expandFileName(curPath / addInc)
|
||||||
fname = extractFileName(finc).search()
|
fname = finc.replace(curPath & $DirSep, "")
|
||||||
|
|
||||||
if fname.len() > 0:
|
if fname.len() > 0:
|
||||||
# only add if the file is non-empty
|
# only add if the file is non-empty
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue