DfsPackFile: Do not attempt to read stream if pack doesn't have it
Other getters (e.g. bitmap or commit graph) cover the case that the pack doesn't have the corresponding extension. Do the same here to detect this early and avoid an IOException in openFile. Change-Id: I29726b7ede0f795d35543453a3e7f92cee872a78
This commit is contained in:
parent
9323b430b9
commit
f91afe5f57
|
@ -310,7 +310,8 @@ private PackObjectSizeIndex getObjectSizeIndex(DfsReader ctx)
|
|||
return objectSizeIndex;
|
||||
}
|
||||
|
||||
if (objectSizeIndexLoadAttempted) {
|
||||
if (objectSizeIndexLoadAttempted
|
||||
|| !desc.hasFileExt(OBJECT_SIZE_INDEX)) {
|
||||
// Pack doesn't have object size index
|
||||
return null;
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue