Skip to content

Commit 5b75eee

Browse files
committed
Forward error code from process_band function
1 parent 324d41e commit 5b75eee

1 file changed

Lines changed: 4 additions & 2 deletions

File tree

src/sparsebundlefs.cpp

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -275,8 +275,10 @@ static int sparsebundle_iterate_bands(const char *path, size_t length, off_t off
275275
ssize_t read = read_ops->process_band(band_path, to_read, band_offset, read_ops->data);
276276
free(band_path);
277277

278-
if (read < 0)
279-
return -errno;
278+
if (read < 0) {
279+
// Got -errno from processing
280+
return read;
281+
}
280282

281283
if (size_t(read) < to_read) {
282284
to_read = to_read - read;

0 commit comments

Comments
 (0)