Merge pull request #492 from AkihiroSuda/fix-dist-ls
content: fix panic during filepath.Walk()
This commit is contained in:
commit
f861817a8e
1 changed files with 3 additions and 0 deletions
|
@ -173,6 +173,9 @@ func (cs *Store) Walk(fn WalkFunc) error {
|
||||||
root := filepath.Join(cs.root, "blobs")
|
root := filepath.Join(cs.root, "blobs")
|
||||||
var alg digest.Algorithm
|
var alg digest.Algorithm
|
||||||
return filepath.Walk(root, func(path string, fi os.FileInfo, err error) error {
|
return filepath.Walk(root, func(path string, fi os.FileInfo, err error) error {
|
||||||
|
if err != nil {
|
||||||
|
return err
|
||||||
|
}
|
||||||
if !fi.IsDir() && !alg.Available() {
|
if !fi.IsDir() && !alg.Available() {
|
||||||
return nil
|
return nil
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue