From 5c303fa4e9a3f3f2e43bfd956479714290689bd9 Mon Sep 17 00:00:00 2001 From: ArielLeyva Date: Thu, 11 Dec 2025 09:58:13 -0500 Subject: [PATCH] fix: display the directory name in the shared folder view --- 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) }