aboutsummaryrefslogtreecommitdiff
path: root/weed/storage/store.go
diff options
context:
space:
mode:
Diffstat (limited to 'weed/storage/store.go')
-rw-r--r--weed/storage/store.go6
1 files changed, 3 insertions, 3 deletions
diff --git a/weed/storage/store.go b/weed/storage/store.go
index cfc409c39..43d4595bf 100644
--- a/weed/storage/store.go
+++ b/weed/storage/store.go
@@ -509,12 +509,12 @@ func (s *Store) UnmountVolume(i needle.VolumeId) error {
func (s *Store) DeleteVolume(i needle.VolumeId, onlyEmpty bool) error {
v := s.findVolume(i)
- if onlyEmpty && !v.IsEmpty() {
- return fmt.Errorf("delete volume %d not empty", i)
- }
if v == nil {
return fmt.Errorf("delete volume %d not found on disk", i)
}
+ if onlyEmpty && !v.IsEmpty() {
+ return fmt.Errorf("delete volume %d not empty", i)
+ }
message := master_pb.VolumeShortInformationMessage{
Id: uint32(v.Id),
Collection: v.Collection,