diff --git a/src/Games/NexusMods.Games.RedEngine/Cyberpunk2077/Cyberpunk2077Game.cs b/src/Games/NexusMods.Games.RedEngine/Cyberpunk2077/Cyberpunk2077Game.cs index 91bcf3055..4146f23dd 100644 --- a/src/Games/NexusMods.Games.RedEngine/Cyberpunk2077/Cyberpunk2077Game.cs +++ b/src/Games/NexusMods.Games.RedEngine/Cyberpunk2077/Cyberpunk2077Game.cs @@ -41,10 +41,12 @@ protected override IReadOnlyDictionary GetLocations(IF var result = new Dictionary() { { LocationId.Game, installation.Path }, - { - LocationId.Saves, - fileSystem.GetKnownPath(KnownPath.HomeDirectory).Combine("Saved Games/CD Projekt Red/Cyberpunk 2077") - }, + // Skip managing saves for now, to prevent accidental deletion of saves + // e.g. when removing loadouts, un-managing the game, or uninstalling the app + // { + // LocationId.Saves, + // fileSystem.GetKnownPath(KnownPath.HomeDirectory).Combine("Saved Games/CD Projekt Red/Cyberpunk 2077") + // }, { LocationId.AppData, fileSystem.GetKnownPath(KnownPath.LocalApplicationDataDirectory) diff --git a/src/Games/NexusMods.Games.RedEngine/Cyberpunk2077/Cyberpunk2077Synchronizer.cs b/src/Games/NexusMods.Games.RedEngine/Cyberpunk2077/Cyberpunk2077Synchronizer.cs index ccfeca98f..30145ef8e 100644 --- a/src/Games/NexusMods.Games.RedEngine/Cyberpunk2077/Cyberpunk2077Synchronizer.cs +++ b/src/Games/NexusMods.Games.RedEngine/Cyberpunk2077/Cyberpunk2077Synchronizer.cs @@ -27,6 +27,10 @@ public class Cyberpunk2077Synchronizer : ALoadoutSynchronizer /// private static GamePath RedModTweaksFolder => new(LocationId.Game, "tools/redmod/tweaks"); + private static GamePath ArchivePcContentFolder => new(LocationId.Game, "archive/pc/content"); + + private static GamePath ArchivePcEp1Folder => new(LocationId.Game, "archive/pc/ep1"); + private readonly RedModDeployTool _redModTool; @@ -41,16 +45,18 @@ protected internal Cyberpunk2077Synchronizer(IServiceProvider provider) : base(p private static readonly GamePath[] IgnoredBackupFolders = [ - new GamePath(LocationId.Game, "archive/pc/content"), - new GamePath(LocationId.Game, "archive/pc/ep1"), + ArchivePcContentFolder, + ArchivePcEp1Folder, ]; public override bool IsIgnoredPath(GamePath path) { // Ignore the mod cache folder, as it's regenerated by redmod every time we deploy using the tool. + return path.InFolder(RedModCacheFolder) - || path.InFolder(RedModScriptsFolder) - || path.InFolder(RedModTweaksFolder); + || path.InFolder(RedModScriptsFolder) + || path.InFolder(RedModTweaksFolder) + || !_settings.DoFullGameBackup && (path.InFolder(ArchivePcContentFolder) || path.InFolder(ArchivePcEp1Folder)); } public override async Task Synchronize(Loadout.ReadOnly loadout)