mirror of
https://github.com/filebrowser/filebrowser.git
synced 2026-01-22 18:27:42 +00:00
fix: display the directory name in the shared folder view (#5617)
This commit is contained in:
parent
169e97e6f9
commit
6d4c867672
1 changed files with 6 additions and 0 deletions
|
|
@ -74,6 +74,12 @@ var withHashFile = func(fn handleFunc) handleFunc {
|
|||
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
|
||||
return fn(w, r, d)
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue