Skip to content

Commit

Permalink
Only ignore game pak files inside Data not loose files
Browse files Browse the repository at this point in the history
  • Loading branch information
Al12rs committed Sep 24, 2024
1 parent d5104fd commit 5160426
Showing 1 changed file with 7 additions and 3 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@
using NexusMods.Abstractions.GameLocators;
using NexusMods.Abstractions.Loadouts.Synchronizers;
using NexusMods.Abstractions.Settings;
using NexusMods.Paths;

namespace NexusMods.Games.Larian.BaldursGate3;

Expand All @@ -15,6 +16,8 @@ public class BaldursGate3Synchronizer : ALoadoutSynchronizer

private static GamePath ModSettingsFile => new(LocationId.From("PlayerProfiles"), "modsettings.lsx");

private static Extension PakExtension => new Extension(".pak");


public BaldursGate3Synchronizer(IServiceProvider provider) : base(provider)
{
Expand All @@ -27,9 +30,10 @@ public override bool IsIgnoredPath(GamePath path)
// Always ignore all PlayerProfile files except the modsettings file.
if (path.InFolder(PublicPlayerProfiles))
return path.Path != ModSettingsFile.Path;
if (path.InFolder(DataFolder))
return true;
return false;

if (_settings.DoFullGameBackup) return false;

return path.InFolder(DataFolder) && path.Extension == PakExtension;
}

public override bool IsIgnoredBackupPath(GamePath path)
Expand Down

0 comments on commit 5160426

Please sign in to comment.