diff --git a/drivers/base/cache.go b/drivers/base/cache.go index 5ba0b0a8..e702cf20 100644 --- a/drivers/base/cache.go +++ b/drivers/base/cache.go @@ -5,6 +5,7 @@ import ( "github.com/Xhofe/alist/conf" "github.com/Xhofe/alist/model" "github.com/Xhofe/alist/utils" + log "github.com/sirupsen/logrus" ) func KeyCache(path string, account *model.Account) string { @@ -21,5 +22,7 @@ func GetCache(path string, account *model.Account) (interface{}, error) { } func DeleteCache(path string, account *model.Account) error { - return conf.Cache.Delete(conf.Ctx, KeyCache(path, account)) + err := conf.Cache.Delete(conf.Ctx, KeyCache(path, account)) + log.Debugf("delete cache %s: %+v", path, err) + return err } diff --git a/server/webdav/file.go b/server/webdav/file.go index 26e1773e..885bee99 100644 --- a/server/webdav/file.go +++ b/server/webdav/file.go @@ -203,6 +203,7 @@ func slashClean(name string) string { func moveFiles(ctx context.Context, fs *FileSystem, src string, dst string, overwrite bool) (status int, err error) { src = utils.ParsePath(src) dst = utils.ParsePath(dst) + log.Debugf("move %s -> %s", src, dst) if src == dst { return http.StatusMethodNotAllowed, errDestinationEqualsSource } @@ -230,6 +231,7 @@ func moveFiles(ctx context.Context, fs *FileSystem, src string, dst string, over func copyFiles(ctx context.Context, fs *FileSystem, src string, dst string, overwrite bool, depth int, recursion int) (status int, err error) { src = utils.ParsePath(src) dst = utils.ParsePath(dst) + log.Debugf("move %s -> %s", src, dst) if src == dst { return http.StatusMethodNotAllowed, errDestinationEqualsSource } diff --git a/server/webdav/webdav.go b/server/webdav/webdav.go index 2823aa7c..16e62fce 100644 --- a/server/webdav/webdav.go +++ b/server/webdav/webdav.go @@ -46,6 +46,7 @@ func (h *Handler) stripPrefix(p string) (string, int, error) { func isPathExist(ctx context.Context, fs *FileSystem, path string) (bool, FileInfo) { file, err := fs.File(path) if err != nil { + log.Debug(err) return false, nil } return true, file