feat(trash): add bulk purge and automatic retention

This commit is contained in:
eezd committed 2026-10-25 11:56:28 +08:00
1 parent 2b8f18f0db
commit ac10de0466
16 files changed
+528 -26

No files matched your search

+6
View File
@@ -84,6 +84,12 @@ func run(addr string) error {
srv.ThemesDir = filepath.Join(dataDir, "themes")
srv.PluginsDir = filepath.Join(dataDir, "plugins")
srv.FontsDir = filepath.Join(dataDir, "fonts")
trashDone := make(chan struct{})
go func() {
defer close(trashDone)
srv.RunTrashCleanup(ctx)
}()
defer func() { stop(); <-trashDone }()
httpServer := &http.Server{
Addr: addr,
Handler: srv.Handler(web.Dist()),