mirror of
https://github.com/packwiz/packwiz-installer.git
synced 2025-04-19 21:16: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
|
||||
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 {
|
||||
|
Loading…
x
Reference in New Issue
Block a user