refactor: simplify storage path handling across various tasks and storage implementations

This commit is contained in:
krau
2026-01-19 21:27:53 +08:00
parent 6990543c9f
commit 9b52a3e0ce
15 changed files with 22 additions and 25 deletions

View File

@@ -53,7 +53,7 @@ func (w *Webdav) JoinStoragePath(p string) string {
func (w *Webdav) Save(ctx context.Context, r io.Reader, storagePath string) error {
w.logger.Infof("Saving file to %s", storagePath)
storagePath = w.JoinStoragePath(storagePath)
ext := path.Ext(storagePath)
base := strings.TrimSuffix(storagePath, ext)
candidate := storagePath