mirror of
https://github.com/lus/pasty.git
synced 2023-08-10 21:13:09 +03:00
Fix file system driver ID listing
This commit is contained in:
parent
239ad901dd
commit
86522b63df
@ -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 {
|
||||
|
Loading…
Reference in New Issue
Block a user