fix: filesystem based blob storage should not fail when a blob is missing

This commit is contained in:
Mustafa Gezen 2021-10-15 22:27:11 +02:00
parent ef5bd995b1
commit 16e049c658
Signed by: mustafa
GPG Key ID: DCDF010D946438C1

View File

@ -59,6 +59,9 @@ func (f *File) Write(path string, content []byte) error {
func (f *File) Read(path string) ([]byte, error) {
r, err := os.OpenFile(filepath.Join(f.path, path), os.O_RDONLY, 0644)
if err != nil {
if os.IsNotExist(err) {
return nil, nil
}
return nil, err
}