🐛 fix webdav

pull/548/head
微凉 2022-01-29 18:36:22 +08:00
parent f25b557327
commit 2434ac54d0
2 changed files with 2 additions and 9 deletions

View File

@ -24,14 +24,7 @@ func Files(driver base.Driver, account *model.Account, path string) ([]model.Fil
}
func File(driver base.Driver, account *model.Account, path string) (*model.File, error) {
file, _, err := Path(driver, account, path)
if err != nil {
return nil, err
}
if file == nil {
return nil, base.ErrNotFolder
}
return file, nil
return driver.File(path, account)
}
func MakeDir(driver base.Driver, account *model.Account, path string, clearCache bool) error {

View File

@ -46,7 +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(path, err)
log.Debugln(path, err)
return false, nil
}
return true, file