Skip to content

Commit

Permalink
Fixed scanning for encrypted files.
Browse files Browse the repository at this point in the history
This fixes the extremely long start of extraction on large projects (161'000 files freeze the program for a few minutes).
  • Loading branch information
DmitriySalnikov committed Nov 12, 2024
1 parent a0aba8d commit b08eef9
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 4 deletions.
4 changes: 1 addition & 3 deletions Core/GodotPCKExplorer/PCKReader.cs
Original file line number Diff line number Diff line change
Expand Up @@ -527,9 +527,7 @@ public bool ExtractFiles(IEnumerable<string> names, out List<string> 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)
{
Expand Down
2 changes: 1 addition & 1 deletion version.txt
Original file line number Diff line number Diff line change
@@ -1 +1 @@
1.5.0
1.5.1

0 comments on commit b08eef9

Please sign in to comment.