fix(shell): correct volume.list -writable filter unit and comparison (#9231)

* fix(shell): correct volume.list -writable filter unit and comparison

* fix(shell): correct volume.list -writable filter unit and comparison
This commit is contained in:
qzh
2026-04-27 13:20:46 +08:00
committed by GitHub
parent 0b3cc8d121
commit 21fadf5582

View File

@@ -199,7 +199,7 @@ func (c *commandVolumeList) isNotMatchDiskInfo(readOnly bool, collection string,
if *c.readonly && !readOnly {
return true
}
if *c.writable && (readOnly || volumeSize == -1 || c.volumeSizeLimitMb >= uint64(volumeSize)) {
if *c.writable && (readOnly || volumeSize == -1 || (c.volumeSizeLimitMb > 0 && uint64(volumeSize) >= c.volumeSizeLimitMb*util.MiByte)) {
return true
}
if *c.collectionPattern != "" {