gcs: improve error checking

Signed-off-by: Nicola Murino <nicola.murino@gmail.com>
This commit is contained in:
Nicola Murino
2025-05-23 18:25:51 +02:00
parent 3f7533b86a
commit 60af36813b

View File

@@ -430,7 +430,7 @@ func (*GCSFs) IsNotExist(err error) bool {
if err == nil {
return false
}
if err == storage.ErrObjectNotExist || err == storage.ErrBucketNotExist {
if errors.Is(err, storage.ErrObjectNotExist) {
return true
}
var apiErr *googleapi.Error
@@ -633,7 +633,7 @@ func (*GCSFs) Join(elem ...string) string {
}
// HasVirtualFolders returns true if folders are emulated
func (GCSFs) HasVirtualFolders() bool {
func (*GCSFs) HasVirtualFolders() bool {
return true
}