From b08eef956ed2471e186eaaab4e641a74b426d62d Mon Sep 17 00:00:00 2001 From: DmitriySalnikov Date: Wed, 13 Nov 2024 02:41:41 +0300 Subject: [PATCH] Fixed scanning for encrypted files. This fixes the extremely long start of extraction on large projects (161'000 files freeze the program for a few minutes). --- Core/GodotPCKExplorer/PCKReader.cs | 4 +--- version.txt | 2 +- 2 files changed, 2 insertions(+), 4 deletions(-) diff --git a/Core/GodotPCKExplorer/PCKReader.cs b/Core/GodotPCKExplorer/PCKReader.cs index 9639ad1..482cac4 100644 --- a/Core/GodotPCKExplorer/PCKReader.cs +++ b/Core/GodotPCKExplorer/PCKReader.cs @@ -527,9 +527,7 @@ public bool ExtractFiles(IEnumerable names, out List extractedFi int count = 0; double one_file_in_progress_line = 1.0 / files_count; - bool selected_encrypted_files = Files.Where(f => names.Contains(f.Key)).Any(f => f.Value.IsEncrypted); - - if (IsEncryptedFiles && selected_encrypted_files) + if (IsEncryptedFiles && names.Any(name => Files.TryGetValue(name, out var file) && file.IsEncrypted)) { if (encryption_key == null) { diff --git a/version.txt b/version.txt index 3e1ad72..8e03717 100644 --- a/version.txt +++ b/version.txt @@ -1 +1 @@ -1.5.0 \ No newline at end of file +1.5.1 \ No newline at end of file