This commit is contained in:
royalcat 2024-04-24 20:36:33 +03:00
parent 5591f145a9
commit d8ee8a3a24
166 changed files with 15431 additions and 889 deletions
src/host/vfs

View file

@ -342,7 +342,7 @@ func getFile[F File](m map[string]F, name string) (File, error) {
func listDirFromFiles[F File](m map[string]F, name string) ([]fs.DirEntry, error) {
out := make([]fs.DirEntry, 0, len(m))
name = AddTrailSlash(name)
name = AddTrailSlash(path.Clean(name))
for p, f := range m {
if strings.HasPrefix(p, name) {
parts := strings.Split(trimRelPath(p, name), Separator)