Skip to content

Commit 1608551

Browse files
committed
Updater service: Don't bother dealing with decompressing packages for LE games as its pointless.
1 parent 9de6596 commit 1608551

File tree

2 files changed

+6
-6
lines changed

2 files changed

+6
-6
lines changed

MassEffectModManagerCore/modmanager/me3tweaks/services/UpdaterService.cs

Lines changed: 3 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -185,18 +185,16 @@ public static List<ModUpdateInfo> CheckForModUpdates(List<Mod> modsToCheck, bool
185185
// Index existing files
186186
foreach (var v in references)
187187
{
188-
updateStatusCallback?.Invoke(
189-
M3L.GetString(M3L.string_interp_indexingForUpdatesXY, modUpdateInfo.mod.ModName, (int)(i * 100 / total)));
188+
updateStatusCallback?.Invoke(M3L.GetString(M3L.string_interp_indexingForUpdatesXY, modUpdateInfo.mod.ModName, (int)(i * 100 / total)));
190189
i++;
191190
var fpath = Path.Combine(matchingMod.ModPath, v);
192-
if (fpath.RepresentsPackageFilePath())
191+
if (modUpdateInfo.mod.Game.IsOTGame() && fpath.RepresentsPackageFilePath()) //05/08/2023: Only decompress OT packages as LE will always be compressed anyways. We will just double compress it.
193192
{
194193
// We need to make sure it's decompressed
195194
var qPackage = MEPackageHandler.QuickOpenMEPackage(fpath);
196195
if (qPackage.IsCompressed)
197196
{
198-
M3Log.Information(
199-
$@" >> Decompressing compressed package for update comparison check: {fpath}",
197+
M3Log.Information($@" >> Decompressing compressed package for update comparison check: {fpath}",
200198
Settings.LogModUpdater);
201199
try
202200
{

MassEffectModManagerCore/modmanager/usercontrols/UpdaterServicePanel.xaml.cs

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -402,15 +402,17 @@ private UploadModResult UploadMod(Action<double> progressCallback = null, Action
402402
#endregion
403403

404404
#region Check package files are not natively compressed
405+
if (mod.Game.IsOTGame())
405406
{
407+
// LE pacakge files are always compressed.
406408
// In brackets to scope
407409
M3Log.Information(@"UpdaterServiceUpload: Checking for compressed packages");
408410
double numDone = 0;
409411
int totalFiles = files.Count;
410412
var compressedPackages = new List<string>();
411413
foreach (var f in files)
412414
{
413-
CurrentActionText = M3L.GetString(M3L.string_interp_checkingPackagesBeforeUploadX, (numDone * 100 / totalFiles));
415+
CurrentActionText = M3L.GetString(M3L.string_interp_checkingPackagesBeforeUploadX, (int)(numDone * 100 / totalFiles));
414416
numDone++;
415417
if (f.RepresentsPackageFilePath())
416418
{

0 commit comments

Comments
 (0)