mirror of
https://git.eden-emu.dev/eden-emu/eden
synced 2026-11-08 02:12:24 +01:00
[bcat] Verify delivery cache file names as file names (AI-assisted) (#4625)
- [x] I have read and followed the [Contribution Guidelines](https://git.eden-emu.dev/eden-emu/eden/src/branch/master/CONTRIBUTING.md#code-contributions). - [x] I have read and followed the [Coding Guidelines](https://git.eden-emu.dev/eden-emu/eden/src/branch/master/docs/policies/Coding.md) to the best of my ability. - [x] I have read and followed the [website policy](https://git.eden-emu.dev/eden-emu/site-policy). - [ ] I affirm that the content of this pull request body was written and submitted entirely by me, in my own words, and not by an AI agent or LLM. - [ ] I affirm that I did not read any of this, and understand that my pull request will be closed if I check this box. - [x] I affirm that, by submitting this pull request, I am responsible for all of the changes contained within these commits. ------------------- Problem When opening a file in a BCAT directory, Eden validated the file name using the directory validation rules. As a result, valid file names containing '.' (e.g. "VSSetting_0.byaml") were incorrectly rejected. Fix Use VerifyNameValidFile instead of the directory validation routine when validating file names. Test Verified with Splatoon 2. Files such as "VSSetting_0.byaml" could not be opened before the change and now open successfully. Co-authored-by: Dmr77680 <dmr77680@noreply.git.eden-emu.dev> Reviewed-on: https://git.eden-emu.dev/eden-emu/eden/pulls/4625 Reviewed-by: crueter <crueter@eden-emu.dev> Reviewed-by: lizzie <lizzie@eden-emu.dev>
This commit is contained in:
parent
fa03b58f04
commit
07677aa500
1 changed files with 1 additions and 1 deletions
|
|
@ -39,7 +39,7 @@ Result IDeliveryCacheFileService::Open(const DirectoryName& dir_name_raw,
|
|||
LOG_DEBUG(Service_BCAT, "called, dir_name={}, file_name={}", dir_name, file_name);
|
||||
|
||||
R_TRY(VerifyNameValidDir(dir_name_raw));
|
||||
R_TRY(VerifyNameValidDir(file_name_raw));
|
||||
R_TRY(VerifyNameValidFile(file_name_raw));
|
||||
R_UNLESS(current_file == nullptr, ResultEntityAlreadyOpen);
|
||||
|
||||
const auto dir = root->GetSubdirectory(dir_name);
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue