fix: match CHFS WebDAV overwrite status
This commit is contained in:
@@ -803,7 +803,6 @@ func (f *webdavStorageFS) Create(ctx context.Context, name string, body io.ReadC
|
|||||||
if statErr != nil && !os.IsNotExist(statErr) {
|
if statErr != nil && !os.IsNotExist(statErr) {
|
||||||
return nil, false, statErr
|
return nil, false, statErr
|
||||||
}
|
}
|
||||||
created := os.IsNotExist(statErr)
|
|
||||||
file, err := f.store.Create(p)
|
file, err := f.store.Create(p)
|
||||||
if err != nil {
|
if err != nil {
|
||||||
return nil, false, err
|
return nil, false, err
|
||||||
@@ -818,7 +817,7 @@ func (f *webdavStorageFS) Create(ctx context.Context, name string, body io.ReadC
|
|||||||
return nil, false, closeErr
|
return nil, false, closeErr
|
||||||
}
|
}
|
||||||
fi, err := f.info(p)
|
fi, err := f.info(p)
|
||||||
return fi, created, err
|
return fi, true, err
|
||||||
}
|
}
|
||||||
|
|
||||||
func (f *webdavStorageFS) RemoveAll(ctx context.Context, name string, opts *webdav.RemoveAllOptions) error {
|
func (f *webdavStorageFS) RemoveAll(ctx context.Context, name string, opts *webdav.RemoveAllOptions) error {
|
||||||
|
|||||||
Reference in New Issue
Block a user