Skip to content

CODE | Validate path scheme in getBucketIds#22

Description

@sevenbitbyte

馃 Code Proposal

Improve gpgfs.getBucketIds() to be more robust and fully filter for valid bucket directories.

Verify:

  1. Path contains a valid bucket id
  2. Path is a directory

gpgfs/src/gpgfs.js

Lines 212 to 220 in fe51f8b

async getBucketIds(){
const bucketPaths = (await this.readDir('/buckets'))
.map(item=>{
return item.replace('bucket-','')
})
debug('found ids', bucketPaths)
return bucketPaths
}

Motivation

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions