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

compiler: fix live reload on win with auto completed filename .\file.v

This commit is contained in:
joe-conigliaro
2019-09-22 00:08:48 +10:00
committed by Alexander Medvednikov
parent 9b7ca248f0
commit b1e1536d56
2 changed files with 9 additions and 5 deletions

View File

@@ -4,7 +4,10 @@
module main
import strings
import(
os
strings
)
const (
MaxLocalVars = 50
@@ -455,7 +458,7 @@ fn (p mut Parser) fn_decl() {
}
// We are in live code reload mode, call the .so loader in bg
if p.pref.is_live {
file_base := p.file_path.replace('.v', '')
file_base := os.filename(p.file_path).replace('.v', '')
if p.os != .windows && p.os != .msvc {
so_name := file_base + '.so'
p.genln('