Konstantin Lebedev
2 years ago
committed by
GitHub
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with
2 additions and
2 deletions
-
weed/storage/volume.go
|
@ -333,6 +333,6 @@ func (v *Volume) IsReadOnly() bool { |
|
|
return v.noWriteOrDelete || v.noWriteCanDelete || v.location.isDiskSpaceLow |
|
|
return v.noWriteOrDelete || v.noWriteCanDelete || v.location.isDiskSpaceLow |
|
|
} |
|
|
} |
|
|
func (v *Volume) IsEmpty() bool { |
|
|
func (v *Volume) IsEmpty() bool { |
|
|
size, _, _ := v.DataBackend.GetStat() |
|
|
|
|
|
return size <= 8 && v.ContentSize() == 0 |
|
|
|
|
|
|
|
|
datSize, _, _ := v.FileStat() |
|
|
|
|
|
return datSize <= super_block.SuperBlockSize && v.ContentSize() == 0 |
|
|
} |
|
|
} |