Closed czyt closed 1 year ago
I found the following snippets in your repository. I will now analyze these snippets and come up with a plan.
src/portable.h
✅ Commit 5dc5626
• In the `GetUserDataDir()` function, replace the hard-coded path with a call to `GetPrivateProfileStringW` to retrieve the UserData path from the ini file. Use the `GetModuleFileName` function to get the path of the executable file, and append the ini file name to it to get the full path of the ini file. Pass this path, along with the section name ("opt") and the key name ("UserData"), to `GetPrivateProfileStringW`.
• Do the same in the `GetDiskCacheDir()` function, but retrieve the CacheDir path instead.Sandbox Execution Logs
trunk fmt `src/portable.h`
1/4 ✓Checked 1 file ✔ No issues
trunk check --fix --print-failures `src/portable.h`
2/4 ✓Checked 1 file ✔ No issues
trunk fmt `src/portable.h`
3/4 ✓Checked 1 file ✔ No issues
trunk check --fix --print-failures `src/portable.h`
4/4 ✓Checked 1 file ✔ No issues
I have finished reviewing the code for completeness. I did not find errors for sweep/read-ini-config
.
.
💡 To recreate the pull request edit the issue title or description. To tweak the pull request, leave a comment on the pull request. Join Our Discord
please use builtin
GetPrivateProfileXXX
to read ini file, the ini file locates in the same dir of the binary dir.the ini file sample:Checklist
- [X] ``src/portable.h`` ✅ Commit [`5dc5626`](https://github.com/czyt/vivaldi_plus/commit/5dc5626f6f372c7b5583dd488e846954026f9f44)