List the files under a path by path, not by string prefix (closes #223)
check / check (push) Successful in 12m16s
check / check (push) Successful in 12m16s
FileRepository.ListByPrefix matched with SQL LIKE: a plain string prefix that ignores ASCII case and treats _ and % as wildcards. Restoring /home/u/doc also restored doc2, DOC and doc.txt.bak, and a backup counted the files of a longer sibling path as deleted. It is now ListUnderPath, which returns the file at the path and every file whose path starts with the path plus a slash, compared exactly. A trailing slash is ignored, so "/" still lists every file. Three tests relied on string-prefix matching and now name a full path or call ListAll. ListIDsWithChunksNotInUploadedBlobs keeps its LIKE: it only adds file IDs the scan never looks up. Model: opus-5-5
This commit was merged in pull request #250.
This commit is contained in:
@@ -71,7 +71,7 @@ func verifyBackupFiles(
|
||||
) {
|
||||
t.Helper()
|
||||
|
||||
files, err := repos.Files.ListByPrefix(ctx, "")
|
||||
files, err := repos.Files.ListAll(ctx)
|
||||
if err != nil {
|
||||
t.Fatalf("Failed to list files: %v", err)
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user