🎨 add some debug log
This commit is contained in:
@ -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
|
||||
}
|
||||
|
@ -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
|
||||
|
Reference in New Issue
Block a user