mirror of
https://github.com/krau/SaveAny-Bot.git
synced 2026-06-11 10:29:38 +08:00
refactor: simplify storage path handling across various tasks and storage implementations
This commit is contained in:
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user