diff options
Diffstat (limited to 'internal/vfs/zip/vfs.go')
-rw-r--r-- | internal/vfs/zip/vfs.go | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/internal/vfs/zip/vfs.go b/internal/vfs/zip/vfs.go index 78a77e1c..d3c5cf9b 100644 --- a/internal/vfs/zip/vfs.go +++ b/internal/vfs/zip/vfs.go @@ -9,6 +9,7 @@ import ( "github.com/patrickmn/go-cache" + "gitlab.com/gitlab-org/gitlab-pages/internal/httprange" "gitlab.com/gitlab-org/gitlab-pages/internal/vfs" "gitlab.com/gitlab-org/gitlab-pages/metrics" ) @@ -82,6 +83,11 @@ func (fs *zipVFS) Root(ctx context.Context, path string) (vfs.Root, error) { continue } + // If archive is not found, return a known `vfs` error + if err == httprange.ErrNotFound { + err = &vfs.ErrNotExist{Inner: err} + } + return root, err } } |