mirror of
https://github.com/packwiz/packwiz-installer.git
synced 2025-10-16 16:04:32 +02:00
Compare commits
2 Commits
Author | SHA1 | Date | |
---|---|---|---|
|
c0c318772b | ||
|
580408b92a |
@@ -124,7 +124,7 @@ class DownloadTask implements IOptionDetails, IExceptionDetails {
|
||||
|
||||
// Don't update files marked with preserve if they already exist on disk
|
||||
if (metadata.preserve) {
|
||||
if (Files.exists(destPath)) {
|
||||
if (destPath.toFile().exists()) {
|
||||
return;
|
||||
}
|
||||
}
|
||||
|
@@ -161,7 +161,7 @@ public class UpdateManager {
|
||||
// if isn't optional, or is optional but optionValue == true
|
||||
if (!entry.getValue().isOptional || entry.getValue().optionValue) {
|
||||
if (entry.getValue().cachedLocation != null) {
|
||||
if (!Files.exists(Paths.get(opts.packFolder, entry.getValue().cachedLocation))) {
|
||||
if (!Paths.get(opts.packFolder, entry.getValue().cachedLocation).toFile().exists()) {
|
||||
invalid = true;
|
||||
}
|
||||
} else {
|
||||
|
@@ -35,8 +35,14 @@ public class CLIHandler implements IUserInterface {
|
||||
}
|
||||
|
||||
@Override
|
||||
public Future<Boolean> showOptions(List<IOptionDetails> option) {
|
||||
throw new RuntimeException("Optional mods not implemented for CLI! Make sure your optional mods are only on the client side!");
|
||||
public Future<Boolean> showOptions(List<IOptionDetails> options) {
|
||||
for (IOptionDetails opt : options) {
|
||||
opt.setOptionValue(true);
|
||||
System.out.println("Warning: accepting option " + opt.getName() + " as option choosing is not implemented in the CLI");
|
||||
}
|
||||
CompletableFuture<Boolean> future = new CompletableFuture<>();
|
||||
future.complete(false); // Can't be cancelled!
|
||||
return future;
|
||||
}
|
||||
|
||||
@Override
|
||||
|
Reference in New Issue
Block a user