Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Implement ResourcePath type #1156

Merged
merged 12 commits into from
Feb 15, 2023
Merged

Implement ResourcePath type #1156

merged 12 commits into from
Feb 15, 2023

Conversation

dragonzkiller
Copy link
Member

@dragonzkiller dragonzkiller commented Feb 11, 2023

Closes #1062
Closes #1130

Implemented:

  • all DepotPaths are now a new ResourcePath type rather than CName to ensure files are properly hashed before loading into the game
    • all paths are properly sanitized before being hashed (essentially the same as in RED4Ext )
    • RedRefEditor is now based on ResourcePath enabling hashes written to CR2W files to be properly sanitized
  • ChunkViewModel will now display hashes and guessed extensions for files without a resolved path
  • ChunkViewModel will now add hashes for raRefs that have a DepotPath and a hash, but are not loaded into the HashService as user hashes. This does a few additional things:
    • When adding a file view the tree view, ChunkViewModel will now place files in the project with their resolved paths even if they didn't previously have a hash in HashService
    • Open in new tab in ChunkViewModel will now open the tab with the resolved name and/or extension (rather than 1234.....bin)

Fixed:

  • User and project hashes are written upon application exit. These hashes are loaded into HashService upon application start
  • Properties View will now display file hashes for top level files with the same logic used when packing the actual archive

Notes:

  • ChunkViewModel will only add hashes if the tree view is expanded to a raRef, it doesn't currently scan the entire file upon opening
  • As a path must be resolved, if a user opens a files and sees a raRef that is displaying only the hash, adding the file will still only use the hash and guessed file extension and be placed in the root directory. It might be possible to scan for such files and rename accordingly at a later date

@dragonzkiller dragonzkiller added this to the Version-8.8.2 milestone Feb 11, 2023
@dragonzkiller dragonzkiller self-assigned this Feb 11, 2023
@dragonzkiller dragonzkiller marked this pull request as ready for review February 12, 2023 00:12
Copy link
Contributor

@seberoth seberoth left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

lgtm

@rfuzzo rfuzzo merged commit ee7676c into main Feb 15, 2023
@seberoth seberoth deleted the resourcepath branch February 21, 2023 07:29
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.

unknown file paths [BOT] Uppercase handling
3 participants