mirror of
https://github.com/packwiz/packwiz-installer.git
synced 2025-04-19 21:16:30 +02:00
Whoops, I am bad programmer
This commit is contained in:
parent
eaed3b2187
commit
dcf8d21aad
@ -187,7 +187,7 @@ class DownloadTask implements IOptionDetails {
|
||||
|
||||
public boolean correctSide() {
|
||||
if (metadata.linkedFile != null) {
|
||||
return downloadSide.hasSide(metadata.linkedFile.side);
|
||||
return metadata.linkedFile.side.hasSide(downloadSide);
|
||||
}
|
||||
return true;
|
||||
}
|
||||
|
@ -323,8 +323,16 @@ public class UpdateManager {
|
||||
task = null;
|
||||
}
|
||||
// Update manifest - If there were no errors cachedFile has already been modified in place (good old pass by reference)
|
||||
if (task != null && task.getException() != null) {
|
||||
manifest.cachedFiles.put(task.metadata.file, task.cachedFile.getRevert());
|
||||
if (task != null) {
|
||||
if (task.getException() != null) {
|
||||
ManifestFile.File file = task.cachedFile.getRevert();
|
||||
if (file != null) {
|
||||
manifest.cachedFiles.put(task.metadata.file, file);
|
||||
}
|
||||
} else {
|
||||
// idiot, if it wasn't there in the first place it won't magically appear there
|
||||
manifest.cachedFiles.putIfAbsent(task.metadata.file, task.cachedFile);
|
||||
}
|
||||
}
|
||||
// TODO: show errors properly?
|
||||
String progress;
|
||||
|
Loading…
x
Reference in New Issue
Block a user