Skip to content

Commit

Permalink
fix: log: Stop logging file does not exists
Browse files Browse the repository at this point in the history
Stop logging `file does not exists` errors when retrieving disk usage information.
  • Loading branch information
rjan90 committed Mar 29, 2023
1 parent 841b7b8 commit a999469
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion storage/paths/localstorage_cached.go
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
package paths

import (
"os"
"sync"
"time"

Expand Down Expand Up @@ -103,7 +104,9 @@ func (c *cachedLocalStorage) DiskUsage(path string) (int64, error) {
go func() {
du, err := c.base.DiskUsage(path)
if err != nil {
log.Errorw("error getting disk usage", "path", path, "error", err)
if !os.IsNotExist(err) {
log.Errorw("error getting disk usage", "path", path, "error", err)
}
}
resCh <- diskUsageResult{
usage: du,
Expand Down

0 comments on commit a999469

Please sign in to comment.