fix: log: Stop logging file does not exists
Stop logging `file does not exists` errors when retrieving disk usage information.
This commit is contained in:
parent
841b7b8730
commit
a99946937c
@ -1,6 +1,7 @@
|
||||
package paths
|
||||
|
||||
import (
|
||||
"os"
|
||||
"sync"
|
||||
"time"
|
||||
|
||||
@ -103,8 +104,10 @@ func (c *cachedLocalStorage) DiskUsage(path string) (int64, error) {
|
||||
go func() {
|
||||
du, err := c.base.DiskUsage(path)
|
||||
if err != nil {
|
||||
if !os.IsNotExist(err) {
|
||||
log.Errorw("error getting disk usage", "path", path, "error", err)
|
||||
}
|
||||
}
|
||||
resCh <- diskUsageResult{
|
||||
usage: du,
|
||||
time: time.Now(),
|
||||
|
Loading…
Reference in New Issue
Block a user