Fix wrong error checking in fsHandler.go

This commit is contained in:
Stefan Majer 2017-10-30 07:44:57 +01:00
parent eaa3532918
commit d5e2ffbef7

View File

@ -92,10 +92,10 @@ func (fh *realFsHandler) update() error {
fh.Lock() fh.Lock()
defer fh.Unlock() defer fh.Unlock()
fh.lastUpdate = time.Now() fh.lastUpdate = time.Now()
if rootDiskErr == nil && fh.rootfs != "" { if rootInodeErr == nil && fh.rootfs != "" {
fh.usage.InodeUsage = inodeUsage fh.usage.InodeUsage = inodeUsage
} }
if rootInodeErr == nil && fh.rootfs != "" { if rootDiskErr == nil && fh.rootfs != "" {
fh.usage.TotalUsageBytes = baseUsage + extraDirUsage fh.usage.TotalUsageBytes = baseUsage + extraDirUsage
} }
if extraDiskErr == nil && fh.extraDir != "" { if extraDiskErr == nil && fh.extraDir != "" {