mirror of
https://github.com/distribution/distribution.git
synced 2026-01-25 14:44:37 +00:00
Address PathNotFoundError in (*manifestStore).Exists
Exists was returning an error when encountering a PathNotFoundError when it should just return false without an error.
This commit is contained in:
@@ -24,7 +24,12 @@ func (ms *manifestStore) Exists(name, tag string) (bool, error) {
|
||||
|
||||
fi, err := ms.driver.Stat(p)
|
||||
if err != nil {
|
||||
return false, err
|
||||
switch err.(type) {
|
||||
case storagedriver.PathNotFoundError:
|
||||
return false, nil
|
||||
default:
|
||||
return false, err
|
||||
}
|
||||
}
|
||||
|
||||
if fi.IsDir() {
|
||||
|
||||
Reference in New Issue
Block a user