filestorage: Use RemoveAll() to delete directories (#282)

According to the godoc
This commit is contained in:
Goksan 2024-04-15 15:52:29 +01:00 committed by GitHub
parent fb2d9bff95
commit 6cb1f8262d
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

View File

@ -92,7 +92,7 @@ func (s *FileStorage) Load(_ context.Context, key string) ([]byte, error) {
// Delete deletes the value at key.
func (s *FileStorage) Delete(_ context.Context, key string) error {
return os.Remove(s.Filename(key))
return os.RemoveAll(s.Filename(key))
}
// List returns all keys that match prefix.