fix error when add

This commit is contained in:
2025-08-25 22:13:23 +02:00
parent 9a14571c31
commit 044d49a9dc
2 changed files with 7 additions and 0 deletions

View File

@@ -313,6 +313,9 @@ func (l *LazyRepository) ReadBlob(id Identifier) (io.ReadSeekCloser, error) {
slog.Debug("loading read buffer...", "id", id)
dst, err := os.OpenFile(filepath.Join(path, "data.tar.gz"), os.O_RDONLY, 0)
if err != nil {
if errors.Is(err, os.ErrNotExist) {
return nil, fmt.Errorf("failed to open blob: %w", ErrNotFound)
}
return nil, fmt.Errorf("failed to open blob: %w", err)
}