Handle snapshot repository's missing index.latest
If index.latest does not exist, the repository is on an older version so simply return the empty repository's generation id.
This commit is contained in:
parent
9270f8a873
commit
9a9259184a
|
@ -748,7 +748,11 @@ public abstract class BlobStoreRepository extends AbstractLifecycleComponent imp
|
||||||
} catch (UnsupportedOperationException e) {
|
} catch (UnsupportedOperationException e) {
|
||||||
// If its a read-only repository, listing blobs by prefix may not be supported (e.g. a URL repository),
|
// If its a read-only repository, listing blobs by prefix may not be supported (e.g. a URL repository),
|
||||||
// in this case, try reading the latest index generation from the index.latest blob
|
// in this case, try reading the latest index generation from the index.latest blob
|
||||||
|
try {
|
||||||
return readSnapshotIndexLatestBlob();
|
return readSnapshotIndexLatestBlob();
|
||||||
|
} catch (NoSuchFileException nsfe) {
|
||||||
|
return RepositoryData.EMPTY_REPO_GEN;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue