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.
This commit is contained in:
N0VAN0M4LY committed 2026-12-03 07:24:54 +08:00
1 parent 10427912e2
commit 18637cf1ff
1 file changed
+26 -6
@@ -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;