mirror of
https://github.com/HMCL-dev/HMCL.git
synced 2025-03-13 17:46:58 +08:00
fix: removing modpack with incomplete installation
This commit is contained in:
parent
3269841207
commit
cd9180c69a
@ -86,7 +86,7 @@ public abstract class VersionList<T extends RemoteVersion> {
|
||||
}
|
||||
|
||||
public Task<?> loadAsync(String gameVersion) {
|
||||
return Task.composeAsync(() -> {
|
||||
return Task.composeAsync(null, () -> {
|
||||
lock.readLock().lock();
|
||||
boolean loaded;
|
||||
|
||||
|
@ -143,7 +143,7 @@ public class CancellableTaskExecutor extends TaskExecutor {
|
||||
.findAny().orElse(null);
|
||||
if (!doDependentsSucceeded && task.isRelyingOnDependents() || cancelled.get()) {
|
||||
task.setException(dependentsException);
|
||||
throw new CancellationException();
|
||||
throw new ExecutionException(dependentsException);
|
||||
}
|
||||
|
||||
if (doDependentsSucceeded)
|
||||
@ -183,7 +183,7 @@ public class CancellableTaskExecutor extends TaskExecutor {
|
||||
if (!doDependenciesSucceeded && task.isRelyingOnDependencies()) {
|
||||
Logging.LOG.severe("Subtasks failed for " + task.getName());
|
||||
task.setException(dependenciesException);
|
||||
throw new CancellationException();
|
||||
throw new ExecutionException(dependenciesException);
|
||||
}
|
||||
|
||||
flag = true;
|
||||
|
@ -211,7 +211,7 @@ public class FileDownloadTask extends Task<Void> {
|
||||
Exception exception = null;
|
||||
|
||||
for (int repeat = 0; repeat < retry * urls.size(); repeat++) {
|
||||
URL url = urls.get(repeat / urls.size());
|
||||
URL url = urls.get(repeat / retry);
|
||||
if (isCancelled()) {
|
||||
break;
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user