mirror of
https://github.com/aptly-dev/aptly.git
synced 2026-05-06 22:18:28 +00:00
s3: fix FileExists not working in some go versions
This commit is contained in:
@@ -491,6 +491,17 @@ func (storage *PublishedStorage) FileExists(path string) (bool, error) {
|
|||||||
return false, nil
|
return false, nil
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// falback in case the above condidition fails
|
||||||
|
var opErr *smithy.OperationError
|
||||||
|
if errors.As(err, &opErr) {
|
||||||
|
var ae smithy.APIError
|
||||||
|
if errors.As(err, &ae) {
|
||||||
|
if (ae.ErrorCode() == "NotFound") {
|
||||||
|
return false, nil
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
return false, err
|
return false, err
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user