fix: return 404 for missing WebDAV delete target
This commit is contained in:
@@ -1210,6 +1210,9 @@ func (f *webdavAuthFS) Move(ctx context.Context, name, dest string, opts *webdav
|
|||||||
func (f *webdavAuthFS) checkTree(ctx context.Context, name string, p auth.PermMask) error {
|
func (f *webdavAuthFS) checkTree(ctx context.Context, name string, p auth.PermMask) error {
|
||||||
info, err := f.inner.Stat(ctx, name)
|
info, err := f.inner.Stat(ctx, name)
|
||||||
if err != nil {
|
if err != nil {
|
||||||
|
if os.IsNotExist(err) {
|
||||||
|
return webdav.NewHTTPError(http.StatusNotFound, err)
|
||||||
|
}
|
||||||
return err
|
return err
|
||||||
}
|
}
|
||||||
if !info.IsDir {
|
if !info.IsDir {
|
||||||
|
|||||||
Reference in New Issue
Block a user