Fix file system driver ID listing

This commit is contained in:
Lukas Schulte Pelkum 2021-04-18 22:05:48 +02:00
parent 239ad901dd
commit 86522b63df
No known key found for this signature in database
GPG Key ID: 408DA7CA81DB885C
1 changed files with 5 additions and 0 deletions

View File

@ -41,6 +41,11 @@ func (driver *FileDriver) ListIDs() ([]string, error) {
return err
}
// Only count JSON files
if !strings.HasSuffix(info.Name(), ".json") {
return nil
}
// Decode the file name
decoded, err := base64.StdEncoding.DecodeString(strings.TrimSuffix(info.Name(), ".json"))
if err != nil {