Repository navigation
Update Vortex to 2.9.0 - #19
Conversation
Vortex now ships node-loot with a Linux libloot, so patch 0020 only maps plugin and local paths for it and the Rust libloot build is gone.
Codex Review SummaryThis comment shows the latest Codex review activity on this pull request.
ℹ️ About Codex in GitHubYour team has set up Codex to review pull requests in this repo. Reviews are triggered when you
Codex reacts with 👀 while any review is running, comments if it has suggestions, and reacts with 👍 once all reviews finish with no findings. |
| +async function move(source: string, target: string, isDirectory: boolean): Promise<void> { | ||
| + const existing = await fs.stat(target).catch(() => undefined); | ||
| + if (isDirectory && existing?.isDirectory()) { | ||
| + for (const child of await fs.readdir(source, { withFileTypes: true })) { | ||
| + await move(path.join(source, child.name), path.join(target, child.name), child.isDirectory()); | ||
| + } | ||
| + await fs.rmdir(source); | ||
| + return; | ||
| + } | ||
| + await fs.mkdir(path.dirname(target), { recursive: true }); | ||
| + await fs.rename(source, target); | ||
| +} |
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: 2bbfaa2dc0
ℹ️ About Codex in GitHub
Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you
- Open a pull request for review
- Mark a draft as ready
- Comment "@codex review".
If Codex has suggestions, it will comment; otherwise it will react with 👍.
Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".
| + const target = path.join(directory, ...parts); | ||
| + await move(source, target, entry.isDirectory()); |
There was a problem hiding this comment.
Prevent symlink traversal while moving backslash entries
When the extracted tree contains a symlink such as escape -> /some/writable/path and an entry named escape\\payload, the target's parent is followed by mkdir/rename, so the payload is moved outside root and can overwrite a file there. Filtering .. does not prevent this; reject or safely resolve symlinked target components before moving archive entries.
Useful? React with 👍 / 👎.
| + mods = updatedState.persistent.mods?.[gameId] ?? {}; | ||
| + const updatedModPaths = game.getModPaths(gameDiscovery.path); | ||
| + validateProfileDeploymentTargets(api, game, profile, mods, updatedModPaths); |
There was a problem hiding this comment.
Refresh the profile after will-deploy handlers
When a will-deploy handler updates the profile through a normal Redux dispatch, it replaces the profile record in state, but this block refreshes only mods and still filters through the pre-event profile object. A mod enabled by that handler can therefore bypass the target validation and be silently skipped when its target is unavailable; reload and validate the profile from updatedState as well.
Useful? React with 👍 / 👎.
| +async function move(source: string, target: string, isDirectory: boolean): Promise<void> { | ||
| + const existing = await fs.stat(target).catch(() => undefined); | ||
| + if (isDirectory && existing?.isDirectory()) { | ||
| + for (const child of await fs.readdir(source, { withFileTypes: true })) { | ||
| + await move(path.join(source, child.name), path.join(target, child.name), child.isDirectory()); | ||
| + } | ||
| + await fs.rmdir(source); | ||
| + return; | ||
| + } | ||
| + await fs.mkdir(path.dirname(target), { recursive: true }); | ||
| + await fs.rename(source, target); |
Updates to Vortex 2.9.0 and fixes #16 and #18.
Closes #17.