mirror of
https://github.com/seaweedfs/seaweedfs.git
synced 2024-01-19 02:48:24 +00:00
fix get file stats for IsEmpty (#4576)
This commit is contained in:
parent
4dd890d4a2
commit
1e22d5caf2
|
@ -333,6 +333,6 @@ func (v *Volume) IsReadOnly() bool {
|
|||
return v.noWriteOrDelete || v.noWriteCanDelete || v.location.isDiskSpaceLow
|
||||
}
|
||||
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
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue