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:

committed by
Alexander Medvednikov

parent
4edade5067
commit
ab91733a28
@ -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
|
||||
|
Reference in New Issue
Block a user