mirror of
https://github.com/vlang/v.git
synced 2023-08-10 21:13:21 +03:00
vweb: make Context.mount_static_folder_at more robust (#13361)
This commit is contained in:
parent
173b4652fb
commit
47ee292ba4
@ -644,7 +644,9 @@ pub fn (mut ctx Context) mount_static_folder_at(directory_path string, mount_pat
|
|||||||
return false
|
return false
|
||||||
}
|
}
|
||||||
dir_path := directory_path.trim_right('/')
|
dir_path := directory_path.trim_right('/')
|
||||||
ctx.scan_static_directory(dir_path, mount_path[1..])
|
|
||||||
|
trim_mount_path := mount_path.trim_left('/').trim_right('/')
|
||||||
|
ctx.scan_static_directory(dir_path, '/$trim_mount_path')
|
||||||
return true
|
return true
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user