Big restructuring and initial work on activitypub
This commit is contained in:
Tobi Smethurst 2021-05-08 14:25:55 +02:00 committed by GitHub
commit 6f5c045284
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
183 changed files with 7391 additions and 5414 deletions

View file

@ -35,7 +35,7 @@ func (s *inMemStorage) RetrieveFileFrom(path string) ([]byte, error) {
l := s.log.WithField("func", "RetrieveFileFrom")
l.Debugf("retrieving from path %s", path)
d, ok := s.stored[path]
if !ok {
if !ok || len(d) == 0 {
return nil, fmt.Errorf("no data found at path %s", path)
}
return d, nil