From 18637cf1ff3bab8a7aabd0705f509c5600ab9ddb Mon Sep 17 00:00:00 2001 From: N0VAN0M4LY <224130499+N0VAN0M4LY@users.noreply.github.com> Date: Thu, 3 Dec 2026 07:24:54 +0800 Subject: [PATCH] fix(launcher): skip user skins, sights, CDK, and launcher log folders when copying game Exclude UserSkins and UserSights from stock client scans as player data folders (matching UserMissions and keeping them protected from symlink redirection during launch), and skip WarThunderCDK plus official launcher/updater log and obsolete folders when copying, sizing, or incrementally updating from a stock installation. Verified: root typecheck, launcher typecheck, and launcher electron-vite build pass; runtime copy test pending. --- .../src/main/services/install/copy-game.ts | 32 +++++++++++++++---- 1 file changed, 26 insertions(+), 6 deletions(-) diff --git a/apps/launcher/src/main/services/install/copy-game.ts b/apps/launcher/src/main/services/install/copy-game.ts index 47d4d6a..1fbafd7 100644 --- a/apps/launcher/src/main/services/install/copy-game.ts +++ b/apps/launcher/src/main/services/install/copy-game.ts @@ -12,14 +12,34 @@ import { linkVerifiedResource, sameResource } from './hardlink-files.ts'; */ /** - * Top-level folders of an installation that hold what the game produced while the player played - * online, not the game itself: logs, the web content cache, replays, screenshots and the player's - * own missions. The offline copy does not take the online game's data (working rules 18); the + * Top-level folders of an installation that hold player-generated data or user content from + * playing online, not the stock client itself: logs, the web content cache, replays, screenshots, + * and user missions, skins and sights. The offline copy does not take the online game's data; the * game creates these folders again when it needs them. */ -export const PLAYER_DATA_FOLDERS = new Set(['.game_logs', 'cache', 'replays', 'screenshots', 'usermissions']); -/** Top-level folders ignored when scanning a stock source, including any stray offline backup directory. */ -const SKIPPED_SOURCE_FOLDERS = new Set([...PLAYER_DATA_FOLDERS, 'wtoffline']); +export const PLAYER_DATA_FOLDERS = new Set([ + '.game_logs', + 'cache', + 'replays', + 'screenshots', + 'usermissions', + 'userskins', + 'usersights', +]); +/** + * Top-level folders ignored when scanning a stock source in addition to player data: + * official launcher/updater logs and obsolete files, the War Thunder CDK toolkit, and any stray + * offline backup directory. + */ +const SKIPPED_SOURCE_FOLDERS = new Set([ + ...PLAYER_DATA_FOLDERS, + '.gaijin_updater_logs', + '.launcher_log', + '.obsolete', + '.start_app_logs', + 'warthundercdk', + 'wtoffline', +]); interface CopyEntry { readonly relativePath: string;