Skip to content

SeaweedFS is a distributed storage system for object storage (S3), file systems, Iceberg table buckets, and Lance vector buckets, designed to handle billions of files with O(1) disk access and effortless horizontal scaling.

fix file listing

elee31571dd96e9c
diff --git a/weed/filer/arangodb/arangodb_store.go b/weed/filer/arangodb/arangodb_store.go
index 3cc9e14c97..dc4fbad84e 100644
--- a/weed/filer/arangodb/arangodb_store.go
+++ b/weed/filer/arangodb/arangodb_store.go
@@ -268,22 +268,19 @@ func (store *ArangodbStore) ListDirectoryPrefixedEntries(ctx context.Context, di
}
func (store *ArangodbStore) ListDirectoryEntries(ctx context.Context, dirPath util.FullPath, startFileName string, includeStartFile bool, limit int64, eachEntryFunc filer.ListEachEntryFunc) (lastFileName string, err error) {
- dir, name := dirPath.DirAndName()
eq := ""
- if includeStartFile {
- eq = "="
+ if !includeStartFile {
+ eq = "filter d.name != \"" + startFileName + "\""
}
- _ = eq
- _ = name
-
- cur, err := store.database.Query(ctx, fmt.Sprintf(`
+ fmt.Println(dirPath, startFileName, includeStartFile)
+ query := fmt.Sprintf(`
for d in files
-filter d.directory == @dir
+filter d.directory == "%s"
sort d.name desc
+%s
limit %d
-return d`, limit), map[string]interface{}{
- "dir": dir,
- })
+return d`, string(dirPath), eq, limit)
+ cur, err := store.database.Query(ctx, query, nil)
if err != nil {
return lastFileName, fmt.Errorf("failed to list directory entries: find error: %w", err)
}