fix: display the directory name in the shared folder view

This commit is contained in:
ArielLeyva 2025-12-11 09:58:13 -05:00
parent 7fa3432f25
commit 5c303fa4e9

View File

@ -74,6 +74,12 @@ var withHashFile = func(fn handleFunc) handleFunc {
return errToStatus(err), err return errToStatus(err), err
} }
if file.IsDir {
// extract name from the last directory in the path
name := filepath.Base(strings.TrimRight(link.Path, string(filepath.Separator)))
file.Name = name
}
d.raw = file d.raw = file
return fn(w, r, d) return fn(w, r, d)
} }