From 7ed0438b04cf3f1126f9058e3c1d0d7f8ad3589f Mon Sep 17 00:00:00 2001 From: Alexander Medvednikov Date: Sat, 17 Aug 2019 16:02:51 +0300 Subject: [PATCH] os: remove PathSeparator hack now that we have v_win.c --- vlib/os/os.v | 10 +--------- 1 file changed, 1 insertion(+), 9 deletions(-) diff --git a/vlib/os/os.v b/vlib/os/os.v index 90ec31e344..8d644e20b8 100644 --- a/vlib/os/os.v +++ b/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 '.' }