Skip to content

Commit

Permalink
Fix max size > !<
Browse files Browse the repository at this point in the history
  • Loading branch information
FloppyDisk committed Sep 12, 2023
1 parent b1f3bbe commit 38c3d18
Showing 1 changed file with 1 addition and 7 deletions.
8 changes: 1 addition & 7 deletions PulsarModLoader/ModManager.cs
Original file line number Diff line number Diff line change
Expand Up @@ -230,7 +230,7 @@ public void LoadModsDirectory(string modsDir)
{
if (Entry.FullName.EndsWith(".dll", StringComparison.OrdinalIgnoreCase))
{
if (Entry.Length < PMLConfig.MaxLoadSizeBytes.Value)
if (Entry.Length > PMLConfig.MaxLoadSizeBytes.Value)
{
Logger.Info($"Error: Extraction of {Entry.Name} failed, Too Large!)");
break;
Expand All @@ -243,12 +243,6 @@ public void LoadModsDirectory(string modsDir)
File.Delete(DestinationPath);
}

if (!DestinationPath.StartsWith(modsDir, StringComparison.Ordinal))
{
Logger.Info($"Extraction Path for {Entry.Name} !modsDir");
break;
}

Entry.ExtractToFile(DestinationPath);
}
}
Expand Down

0 comments on commit 38c3d18

Please sign in to comment.