Bump github.com/containers/common from 0.38.1 to 0.38.4

Bumps [github.com/containers/common](https://github.com/containers/common) from 0.38.1 to 0.38.4.
- [Release notes](https://github.com/containers/common/releases)
- [Commits](https://github.com/containers/common/compare/v0.38.1...v0.38.4)

Signed-off-by: dependabot[bot] <support@github.com>
Signed-off-by: Daniel J Walsh <dwalsh@redhat.com>
This commit is contained in:
dependabot[bot]
2021-05-19 08:15:53 +00:00
committed by Daniel J Walsh
parent 4e57679c9a
commit 91d9ccf5e5
150 changed files with 2212 additions and 1529 deletions

View File

@@ -5,6 +5,7 @@ import (
"io/ioutil"
"os"
"path/filepath"
"sync"
"time"
"github.com/containers/storage/pkg/idtools"
@@ -113,6 +114,7 @@ type containerStore struct {
byid map[string]*Container
bylayer map[string]*Container
byname map[string]*Container
loadMut sync.Mutex
}
func copyContainer(c *Container) *Container {
@@ -615,3 +617,14 @@ func (r *containerStore) TouchedSince(when time.Time) bool {
func (r *containerStore) Locked() bool {
return r.lockfile.Locked()
}
func (r *containerStore) ReloadIfChanged() error {
r.loadMut.Lock()
defer r.loadMut.Unlock()
modified, err := r.Modified()
if err == nil && modified {
return r.Load()
}
return nil
}