Auto calculate image size on actions (#122)

This commit is contained in:
Itxaka
2023-08-08 10:44:42 +02:00
committed by GitHub
parent 3e9befa230
commit 4108aa929e
8 changed files with 102 additions and 14 deletions

View File

@@ -20,6 +20,7 @@ limitations under the License.
package fsutils
import (
"errors"
"io/fs"
"os"
"path/filepath"
@@ -198,7 +199,7 @@ func WalkDirFs(fs v1.FS, root string, fn fs.WalkDirFunc) error {
} else {
err = walkDir(fs, root, &statDirEntry{info}, fn)
}
if err == filepath.SkipDir {
if errors.Is(err, filepath.SkipDir) {
return nil
}
return err
@@ -225,7 +226,7 @@ func walkDir(fs v1.FS, path string, d fs.DirEntry, walkDirFn fs.WalkDirFunc) err
for _, d1 := range dirs {
path1 := filepath.Join(path, d1.Name())
if err := walkDir(fs, path1, d1, walkDirFn); err != nil {
if err == filepath.SkipDir {
if errors.Is(err, filepath.SkipDir) {
break
}
return err