Commit ea6f0a2
committed
fsck: do not give up too early in fsck_dir()
When there is a random garbage file whose name happens to be 38-byte
long in a .git/objects/??/ directory, the loop terminated prematurely
without marking all the other files that it hasn't checked in the
readdir() loop.
Treat such a file just like any other garbage file, and do not break out
of the readdir() loop.
While at it, replace repeated sprintf() calls to a single one outside the
loop.
Signed-off-by: Junio C Hamano <[email protected]>1 parent a1cdc25 commit ea6f0a2
1 file changed
+12
-6
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
392 | 392 | | |
393 | 393 | | |
394 | 394 | | |
| 395 | + | |
| 396 | + | |
| 397 | + | |
| 398 | + | |
| 399 | + | |
| 400 | + | |
| 401 | + | |
| 402 | + | |
| 403 | + | |
395 | 404 | | |
396 | 405 | | |
397 | 406 | | |
398 | 407 | | |
| 408 | + | |
399 | 409 | | |
400 | 410 | | |
401 | 411 | | |
402 | 412 | | |
403 | 413 | | |
404 | 414 | | |
405 | 415 | | |
| 416 | + | |
406 | 417 | | |
407 | | - | |
408 | 418 | | |
409 | 419 | | |
410 | 420 | | |
411 | 421 | | |
412 | | - | |
413 | | - | |
414 | | - | |
415 | | - | |
416 | | - | |
| 422 | + | |
417 | 423 | | |
418 | 424 | | |
419 | 425 | | |
| |||
0 commit comments