os: remove PathSeparator hack now that we have v_win.c
parent
845ae8cf5a
commit
7ed0438b04
10
vlib/os/os.v
10
vlib/os/os.v
|
@ -494,15 +494,7 @@ pub fn dir(path string) string {
|
||||||
if path == '.' {
|
if path == '.' {
|
||||||
return getwd()
|
return getwd()
|
||||||
}
|
}
|
||||||
mut pos := -1
|
pos := path.last_index(PathSeparator)
|
||||||
// TODO PathSeparator defined in os_win.v doesn't work when building V,
|
|
||||||
// because v.c is generated for a nix system.
|
|
||||||
$if windows {
|
|
||||||
pos = path.last_index('\\')
|
|
||||||
}
|
|
||||||
$else {
|
|
||||||
pos = path.last_index(PathSeparator)
|
|
||||||
}
|
|
||||||
if pos == -1 {
|
if pos == -1 {
|
||||||
return '.'
|
return '.'
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue