dev: change err to nil (#2971)

This commit is contained in:
Sasha Melentyev 2022-07-10 21:44:49 +03:00 committed by GitHub
parent 9ebc2d5237
commit ed4befe5ef
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -73,11 +73,8 @@ func (e *Executor) executeCacheStatus(_ *cobra.Command, args []string) {
func dirSizeBytes(path string) (int64, error) {
var size int64
err := filepath.Walk(path, func(_ string, info os.FileInfo, err error) error {
if err != nil {
return err
}
if !info.IsDir() {
size += info.Size()
if err == nil && !info.IsDir() {
size = info.Size()
}
return err
})