diff options
| author | historia <[not public]> | 2026-07-05 18:52:51 -0400 |
|---|---|---|
| committer | historia <[not public]> | 2026-07-05 18:52:51 -0400 |
| commit | 6bd5365cc22f84c047c1585e3f54571af46f53e5 (patch) | |
| tree | 72df0934c72baa1e31817d7db999832c6efb115f /internal/admin/undo.go | |
| parent | 9b54188970c51070d86f4c87e909ea7836c86f07 (diff) | |
| download | thehouseoficarus-6bd5365cc22f84c047c1585e3f54571af46f53e5.tar.gz | |
feat: renameable directories and files in admin gui
Diffstat (limited to 'internal/admin/undo.go')
| -rw-r--r-- | internal/admin/undo.go | 3 |
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)) |
