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.
@@ -748,7 +748,11 @@ public abstract class BlobStoreRepository extends AbstractLifecycleComponent imp
} catch (UnsupportedOperationException e) {
// 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
+ try {
return readSnapshotIndexLatestBlob();
+ } catch (NoSuchFileException nsfe) {
+ return RepositoryData.EMPTY_REPO_GEN;
+ }
}
}
