Skip to content

Commit

Permalink
Fixes empty reservation chache bug (#584)
Browse files Browse the repository at this point in the history
* fixes empty reservation chache issue

* update local_store.go with requested changes
  • Loading branch information
DylanVerstraete authored and zaibon committed Apr 4, 2020
1 parent 22ede1c commit 12be930
Showing 1 changed file with 9 additions and 1 deletion.
10 changes: 9 additions & 1 deletion pkg/provision/local_store.go
Original file line number Diff line number Diff line change
Expand Up @@ -109,7 +109,15 @@ func NewFSStore(root string) (*FSStore, error) {
}

func (s *FSStore) removeAllButPersistent(rootPath string) error {
err := filepath.Walk(rootPath, func(path string, info os.FileInfo, r error) error {
// if rootPath is not present on the filesystem, return
_, err := os.Stat(rootPath)
if os.IsNotExist(err) {
return nil
} else if err != nil {
return err
}

err = filepath.Walk(rootPath, func(path string, info os.FileInfo, r error) error {
if r != nil {
return r
}
Expand Down

0 comments on commit 12be930

Please sign in to comment.