Commit dbf92c7
gvfs-helper: skip collision check for loose objects
When we are installing a loose object, finalize_object_file() first
checks to see if the contents match what already exists in a loose
object file of the target name. However, this doesn't check if the
target is valid, it assumes the target is valid.
However, in the case of a power outage or something like that, the file
may be corrupt (for example: all NUL bytes). That is a common occurrence
when we are needing to install a loose object _again_: we don't think we
have it already so any copy that exists is probably bogus.
Use the flagged version with FOF_SKIP_COLLISION_CHECK to avoid these
types of errors, as seen in GitHub issue
microsoft#837.
Signed-off-by: Derrick Stolee <stolee@gmail.com>1 parent ad6f04c commit dbf92c7
1 file changed
+10
-1
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
2459 | 2459 | | |
2460 | 2460 | | |
2461 | 2461 | | |
2462 | | - | |
| 2462 | + | |
| 2463 | + | |
| 2464 | + | |
| 2465 | + | |
| 2466 | + | |
| 2467 | + | |
| 2468 | + | |
| 2469 | + | |
| 2470 | + | |
| 2471 | + | |
2463 | 2472 | | |
2464 | 2473 | | |
2465 | 2474 | | |
| |||
0 commit comments