Skip to content
Closed
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -667,7 +667,7 @@ private ManifestFile createManifest(int specId, List<ManifestFile> bin) throws I
return mergeManifests.get(bin);
}

ManifestWriter writer = newManifestWriter(ops.current().spec());
ManifestWriter writer = newManifestWriter(ops.current().specsById().get(specId));
try {
for (ManifestFile manifest : bin) {
try (ManifestReader reader = ManifestFiles.read(manifest, ops.io(), ops.current().specsById())) {
Expand All @@ -676,11 +676,11 @@ private ManifestFile createManifest(int specId, List<ManifestFile> bin) throws I
// suppress deletes from previous snapshots. only files deleted by this snapshot
// should be added to the new manifest
if (entry.snapshotId() == snapshotId()) {
writer.addEntry(entry);
writer.delete(entry);
}
} else if (entry.status() == Status.ADDED && entry.snapshotId() == snapshotId()) {
// adds from this snapshot are still adds, otherwise they should be existing
writer.addEntry(entry);
writer.add(entry);
} else {
// add all files from the old manifest as existing files
writer.existing(entry);
Expand Down