Skip to content

Commit

Permalink
Fix deleting spaces (cs3org#3822)
Browse files Browse the repository at this point in the history
* Purge metadata before purging the space

* Add changelog
  • Loading branch information
aduffeck authored and 2403905 committed May 19, 2023
1 parent 88b4209 commit f616410
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 4 deletions.
5 changes: 5 additions & 0 deletions changelog/unreleased/fix-deleting-spaces.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
Bugfix: Fix deleting spaces

We fixed a problem when trying to delete spaces.

https://github.com/cs3org/reva/pull/3822
8 changes: 4 additions & 4 deletions pkg/storage/utils/decomposedfs/spaces.go
Original file line number Diff line number Diff line change
Expand Up @@ -629,13 +629,13 @@ func (fs *Decomposedfs) DeleteStorageSpace(ctx context.Context, req *provider.De
return err
}

// remove space metadata
if err := os.RemoveAll(fs.getSpaceRoot(spaceID)); err != nil {
// invalidate cache
if err := fs.lu.MetadataBackend().Purge(n.InternalPath()); err != nil {
return err
}

// invalidate cache
if err := fs.lu.MetadataBackend().Purge(n.InternalPath()); err != nil {
// remove space metadata
if err := os.RemoveAll(fs.getSpaceRoot(spaceID)); err != nil {
return err
}

Expand Down

0 comments on commit f616410

Please sign in to comment.