1
0
mirror of https://github.com/vlang/v.git synced 2023-08-10 21:13:21 +03:00

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

This commit is contained in:
Alexander Medvednikov 2019-08-17 16:02:51 +03:00
parent 845ae8cf5a
commit 7ed0438b04

View File

@ -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 '.'
} }