os: remove PathSeparator hack now that we have v_win.c

pull/1639/head
Alexander Medvednikov 2019-08-17 16:02:51 +03:00
parent 845ae8cf5a
commit 7ed0438b04
1 changed files with 1 additions and 9 deletions

View File

@ -494,15 +494,7 @@ pub fn dir(path string) string {
if path == '.' {
return getwd()
}
mut pos := -1
// 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)
}
pos := path.last_index(PathSeparator)
if pos == -1 {
return '.'
}