summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorLuke Shumaker <lukeshu@beefcake.parabola.nu>2018-05-18 18:36:29 -0400
committerLuke Shumaker <lukeshu@beefcake.parabola.nu>2018-05-18 18:36:29 -0400
commite1387cd676185555e6f4125cf1dd039f8e1c6f31 (patch)
tree1c6a6a26ea2cf9d25b8e94f67522d1d9aeced94f
parent0468c150fea1a3f0941b786c67bc27e797dade40 (diff)
dedupe-range: correctly handle -errno statuses
-rw-r--r--lib/dedupe-range.c5
1 files changed, 4 insertions, 1 deletions
diff --git a/lib/dedupe-range.c b/lib/dedupe-range.c
index c9e9bb0..614c9c5 100644
--- a/lib/dedupe-range.c
+++ b/lib/dedupe-range.c
@@ -89,7 +89,10 @@ void dedupe_range(uint64_t src_length, struct filepos src, struct filepos *dsts)
range->info[i].dest_offset += range->info[i].bytes_deduped;
break;
default:
- assert(false);
+ assert(range->info[i].status < 0);
+ error(0, -range->info[i].status, "dedupe: %s", dsts[files_deduped+i].filename);
+ erred = true;
+ break;
}
}
if (erred == true)