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

small optimization with generics and use os.is_dir in vweb again

This commit is contained in:
joe-conigliaro
2019-11-22 18:55:20 +11:00
committed by Alexander Medvednikov
parent 4edade5067
commit ab91733a28
2 changed files with 6 additions and 7 deletions

View File

@ -216,7 +216,8 @@ fn (ctx mut Context) scan_static_directory(directory_path, mount_path string) {
}
// todo: os.is_dir is broken now so we expect that file is dir it has no extension
if flag {
// if flag {
if os.is_dir(file) {
ctx.scan_static_directory(directory_path + '/' + file, mount_path + '/' + file)
} else {
ctx.static_files[mount_path + '/' + file] = directory_path + '/' + file