summaryrefslogtreecommitdiff
path: root/pkg/domain/infra/abi/system.go
diff options
context:
space:
mode:
Diffstat (limited to 'pkg/domain/infra/abi/system.go')
-rw-r--r--pkg/domain/infra/abi/system.go12
1 files changed, 11 insertions, 1 deletions
diff --git a/pkg/domain/infra/abi/system.go b/pkg/domain/infra/abi/system.go
index 97fa9d374..f29b98696 100644
--- a/pkg/domain/infra/abi/system.go
+++ b/pkg/domain/infra/abi/system.go
@@ -312,7 +312,17 @@ func (ic *ContainerEngine) SystemDf(ctx context.Context, options entities.System
var reclaimableSize int64
for _, v := range vols {
var consInUse int
- volSize, err := sizeOfPath(v.MountPoint())
+ mountPoint, err := v.MountPoint()
+ if err != nil {
+ return nil, err
+ }
+ if mountPoint == "" {
+ // We can't get any info on this volume, as it's not
+ // mounted.
+ // TODO: fix this.
+ continue
+ }
+ volSize, err := sizeOfPath(mountPoint)
if err != nil {
return nil, err
}