From 1765e5d2b4c4a9f5eeb840b599b3d80a329c686e Mon Sep 17 00:00:00 2001 From: Kyle Fearne Date: Thu, 11 Aug 2022 14:45:36 +0200 Subject: [PATCH] Fix for incorrect snapID --- pkg/storage/fs/cback/cback.go | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/pkg/storage/fs/cback/cback.go b/pkg/storage/fs/cback/cback.go index 8730256f20..6ef1a5dfc1 100644 --- a/pkg/storage/fs/cback/cback.go +++ b/pkg/storage/fs/cback/cback.go @@ -196,6 +196,10 @@ func (fs *cback) ListFolder(ctx context.Context, ref *provider.Reference, mdKeys if resp.Substring != "" { ssID, searchPath = fs.pathTrimmer(snapshotList, resp) + if ssID == "" { + return nil, errtypes.NotFound("cback: snapshotID invalid") + } + //If no match in path, therefore prints the files fmt.Printf("The ssID is: %v\nThe Path is %v\n", ssID, searchPath) ret, err := fs.fileSystem(resp.ID, ssID, user.Username, searchPath, resp.Source)