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:
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 == '.' {
|
||||
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 '.'
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user