Skip to content

Commit

Permalink
Skip s3 listing until actually necessary
Browse files Browse the repository at this point in the history
  • Loading branch information
mannreis committed Dec 11, 2024
1 parent 0260f9c commit 0832d45
Showing 1 changed file with 8 additions and 8 deletions.
16 changes: 8 additions & 8 deletions libnczarr/zmap_s3sdk.c
Original file line number Diff line number Diff line change
Expand Up @@ -223,14 +223,14 @@ zs3open(const char *path, int mode, size64_t flags, void* parameters, NCZMAP** m
z3map->s3client = NC_s3sdkcreateclient(&z3map->s3);

/* Search the root for content */
content = nclistnew();
if((stat = NC_s3sdkgetkeys(z3map->s3client,z3map->s3.bucket,z3map->s3.rootkey,&nkeys,NULL,&z3map->errmsg)))
goto done;
if(nkeys == 0) {
/* dataset does not actually exist; we choose to return ENOOBJECT instead of EEMPTY */
stat = NC_ENOOBJECT;
goto done;
}
// content = nclistnew();
// if((stat = NC_s3sdkgetkeys(z3map->s3client,z3map->s3.bucket,z3map->s3.rootkey,&nkeys,NULL,&z3map->errmsg)))
// goto done;
// if(nkeys == 0) {
// /* dataset does not actually exist; we choose to return ENOOBJECT instead of EEMPTY */
// stat = NC_ENOOBJECT;
// goto done;
// }
if(mapp) *mapp = (NCZMAP*)z3map;

done:
Expand Down

0 comments on commit 0832d45

Please sign in to comment.