mirror of
https://github.com/vlang/v.git
synced 2023-08-10 21:13:21 +03:00
os, filepath: reorganize functions
This commit is contained in:
committed by
Alexander Medvednikov
parent
6e130cd446
commit
dced76d1a4
@@ -7,6 +7,7 @@ import (
|
||||
vweb.tmpl // for `$vweb_html()`
|
||||
os
|
||||
strings
|
||||
filepath
|
||||
)
|
||||
|
||||
fn (p mut Parser) comp_time() {
|
||||
@@ -164,7 +165,7 @@ fn (p mut Parser) comp_time() {
|
||||
// Can't find the template file in current directory,
|
||||
// try looking next to the vweb program, in case it's run with
|
||||
// v path/to/vweb_app.v
|
||||
path = os.dir(p.scanner.file_path) + '/' + path
|
||||
path = filepath.dir(p.scanner.file_path) + '/' + path
|
||||
if !os.exists(path) {
|
||||
p.error('vweb HTML template "$path" not found')
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user