vweb: make Context.mount_static_folder_at more robust (#13361)
							parent
							
								
									173b4652fb
								
							
						
					
					
						commit
						47ee292ba4
					
				|  | @ -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 | ||||
| } | ||||
| 
 | ||||
|  |  | |||
		Loading…
	
		Reference in New Issue