Skip to content

Make directory operations match FindEntry and guard writes over chunk files - #42

Merged
xPaw merged 3 commits into
ValveResourceFormat:masterfrom
w1tcherrr:vrf-vpk-editing-fixes
Oct 21, 2026
Merged

xPaw merged 3 commits into
ValveResourceFormat:masterfrom
w1tcherrr:vrf-vpk-editing-fixes

Conversation

@w1tcherrr

@w1tcherrr w1tcherrr commented Oct 21, 2026 •

Copy link
Copy Markdown
Contributor

Follow-up to #41.

  • RemoveDirectory and RenameDirectory now normalize their input and compare names like FindEntry. Before, materials\ or /materials matched nothing, and materials also removed a separate Materials/ folder that FindEntry can't find.
  • RenameDirectory normalizes the whole moved path and moves nothing if one is rejected.
  • Fixed a KeyNotFoundException in RemoveDirectory/RenameDirectory when type names differ only in case, e.g. TXT and txt.
  • GetFullPath returns a.b. for a file named a.b without an extension, so it finds the file again. x.. is accepted like Valve stores it, and ./.. names are rejected.
  • Write refuses to write over the package's own chunk files.

@xPaw
xPaw merged commit fa208a7 into ValveResourceFormat:master Oct 21, 2026
3 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants