From 6d4c86767239dad4f09f30f48678f2f3a716eb12 Mon Sep 17 00:00:00 2001 From: Ariel Leyva Date: Sat, 13 Dec 2025 03:08:44 -0500 Subject: [PATCH] fix: display the directory name in the shared folder view (#5617) --- http/public.go | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/http/public.go b/http/public.go index ae1bd10a..9b344a55 100644 --- a/http/public.go +++ b/http/public.go @@ -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) }