From 0ce764e1421aa721d98109c743f3512ba57ea254 Mon Sep 17 00:00:00 2001 From: Nicola Murino Date: Fri, 23 May 2025 18:25:51 +0200 Subject: [PATCH] gcs: improve error checking Signed-off-by: Nicola Murino --- internal/vfs/gcsfs.go | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/internal/vfs/gcsfs.go b/internal/vfs/gcsfs.go index f86626ae..72179141 100644 --- a/internal/vfs/gcsfs.go +++ b/internal/vfs/gcsfs.go @@ -420,7 +420,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 @@ -623,7 +623,7 @@ func (*GCSFs) Join(elem ...string) string { } // HasVirtualFolders returns true if folders are emulated -func (GCSFs) HasVirtualFolders() bool { +func (*GCSFs) HasVirtualFolders() bool { return true }