diff options
| author | Konstantin Lebedev <9497591+kmlebedev@users.noreply.github.com> | 2023-06-14 13:43:30 +0500 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2023-06-14 01:43:30 -0700 |
| commit | 1e22d5caf2f34df5886b464f16948a294d429657 (patch) | |
| tree | ff0265eb6bf7a2c658b30462653d463932960a21 | |
| parent | 4dd890d4a2e84b4bdb1335d3454a4e139563d228 (diff) | |
| download | seaweedfs-1e22d5caf2f34df5886b464f16948a294d429657.tar.xz seaweedfs-1e22d5caf2f34df5886b464f16948a294d429657.zip | |
fix get file stats for IsEmpty (#4576)
| -rw-r--r-- | weed/storage/volume.go | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/weed/storage/volume.go b/weed/storage/volume.go index 066f06604..79b0059d6 100644 --- a/weed/storage/volume.go +++ b/weed/storage/volume.go @@ -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 } |
