mirror of
https://github.com/packwiz/packwiz-installer.git
synced 2025-04-20 05:26:30 +02:00
Improve file check speed, apparently Files.exists is slow
This commit is contained in:
parent
580408b92a
commit
c0c318772b
@ -124,7 +124,7 @@ class DownloadTask implements IOptionDetails, IExceptionDetails {
|
|||||||
|
|
||||||
// Don't update files marked with preserve if they already exist on disk
|
// Don't update files marked with preserve if they already exist on disk
|
||||||
if (metadata.preserve) {
|
if (metadata.preserve) {
|
||||||
if (Files.exists(destPath)) {
|
if (destPath.toFile().exists()) {
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -161,7 +161,7 @@ public class UpdateManager {
|
|||||||
// if isn't optional, or is optional but optionValue == true
|
// if isn't optional, or is optional but optionValue == true
|
||||||
if (!entry.getValue().isOptional || entry.getValue().optionValue) {
|
if (!entry.getValue().isOptional || entry.getValue().optionValue) {
|
||||||
if (entry.getValue().cachedLocation != null) {
|
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;
|
invalid = true;
|
||||||
}
|
}
|
||||||
} else {
|
} else {
|
||||||
|
Loading…
x
Reference in New Issue
Block a user