Browse Source

fix build tests

pull/5580/head
Konstantin Lebedev 8 months ago
parent
commit
f391a70974
  1. 2
      weed/filer/tikv/tikv_store.go
  2. 7
      weed/s3api/s3api_object_handlers_list.go

2
weed/filer/tikv/tikv_store.go

@ -210,7 +210,7 @@ func (store *TikvStore) ListDirectoryEntries(ctx context.Context, dirPath util.F
return store.ListDirectoryPrefixedEntries(ctx, dirPath, startFileName, includeStartFile, limit, "", eachEntryFunc) return store.ListDirectoryPrefixedEntries(ctx, dirPath, startFileName, includeStartFile, limit, "", eachEntryFunc)
} }
func (store *TikvStore) ListRecursivePrefixedEntries(ctx context.Context, dirPath util.FullPath, startFileName string, includeStartFile bool, limit int64, delimiter bool, prefix string, eachEntryFunc filer.ListEachEntryFunc) (lastFileName string, err error) {
func (store *TikvStore) ListRecursivePrefixedEntries(ctx context.Context, dirPath util.FullPath, startFileName string, includeStartFile bool, delimiter bool, limit int64, prefix string, eachEntryFunc filer.ListEachEntryFunc) (lastFileName string, err error) {
return lastFileName, filer.ErrUnsupportedRecursivePrefixed return lastFileName, filer.ErrUnsupportedRecursivePrefixed
} }

7
weed/s3api/s3api_object_handlers_list.go

@ -199,17 +199,12 @@ func (s3a *S3ApiServer) listFilerEntries(bucket string, originalPrefix string, m
} }
} }
}() }()
if delimiter == "/" {
if entry.IsDirectory {
if delimiter == "/" && entry.IsDirectory {
commonPrefixes = append(commonPrefixes, PrefixEntry{ commonPrefixes = append(commonPrefixes, PrefixEntry{
Prefix: path[len(bucketPrefix):] + "/", Prefix: path[len(bucketPrefix):] + "/",
}) })
cursor.maxKeys-- cursor.maxKeys--
return return
// Todo use sql group by dir
} else if isCommonDir {
return
}
} }
contents = append(contents, newListEntry(entry, key, "", "", bucketPrefix, fetchOwner, entry.IsDirectoryKeyObject())) contents = append(contents, newListEntry(entry, key, "", "", bucketPrefix, fetchOwner, entry.IsDirectoryKeyObject()))
cursor.maxKeys-- cursor.maxKeys--

Loading…
Cancel
Save