diff --git a/vlib/vweb/vweb.v b/vlib/vweb/vweb.v index 391a34a5de..9327ae066c 100644 --- a/vlib/vweb/vweb.v +++ b/vlib/vweb/vweb.v @@ -644,7 +644,9 @@ pub fn (mut ctx Context) mount_static_folder_at(directory_path string, mount_pat return false } 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 }