aboutsummaryrefslogtreecommitdiff
path: root/internal/admin/undo.go
diff options
context:
space:
mode:
authorhistoria <[not public]>2026-07-05 18:52:51 -0400
committerhistoria <[not public]>2026-07-05 18:52:51 -0400
commit6bd5365cc22f84c047c1585e3f54571af46f53e5 (patch)
tree72df0934c72baa1e31817d7db999832c6efb115f /internal/admin/undo.go
parent9b54188970c51070d86f4c87e909ea7836c86f07 (diff)
downloadthehouseoficarus-6bd5365cc22f84c047c1585e3f54571af46f53e5.tar.gz
feat: renameable directories and files in admin gui
Diffstat (limited to 'internal/admin/undo.go')
-rw-r--r--internal/admin/undo.go3
1 files changed, 3 insertions, 0 deletions
diff --git a/internal/admin/undo.go b/internal/admin/undo.go
index 0c5ebaa..4c39ec6 100644
--- a/internal/admin/undo.go
+++ b/internal/admin/undo.go
@@ -35,6 +35,9 @@ func (c ChangeDesc) ShortDesc() string {
case c.IsDelete:
return fmt.Sprintf("Deleted %s", filepath.Base(c.FilePath))
case c.NewFilePath != "":
+ if filepath.Dir(c.FilePath) == filepath.Dir(c.NewFilePath) {
+ return fmt.Sprintf("Renamed %s", filepath.Base(c.NewFilePath))
+ }
return fmt.Sprintf("Moved %s", filepath.Base(c.NewFilePath))
default:
return fmt.Sprintf("Edited %s", filepath.Base(c.FilePath))