Fall back to lexical normalization on canonicalization failure - #19366
Conversation
d2d533c to
dadfb0d
Compare
|
use lexically_normal() exclusively, not as a fallback. |
|
Ok, I'll swap it out to just do that every time, the only reason I added it as a fallback is I figured canonical was being intentionally used |
|
I think weakly_canonical was used to resolve symlinks. Not sure though |
|
Just let me know which is wanted, I'll go ahead and make the change just in case and I can just revert it back if the fallback is actually the wanted behavior after all |
|
RPCS3 does not support symlinks inside game folders and emulation folders in any way. The code here simplifies the PKG provided paths which their folder structure is within the bounds of the installation folder, which must not have symlinks. |
|
What was the reason for using canonicalization then, if I may ask? It's mostly just used for symlink resolution and avoiding things like the double dot parent dir for avoiding things like transversal attacks unless I'm missing something |
|
This was long ago, I think I added it back then thinking it was sufficient for this purpose. |
|
Makes sense, I know this bug's been around for a bit, I've just finally gotten tired of installing pkgs to local storage and moving them manually into place lol |
Some filesystems, like rclone's mounts in my case, don't support canonicalization, which causes Windows to return a "no recognized filesystem" error and cause the emulator to crash. Falling back to lexical normalization allows such filesystems to be used.
LLM was used to aid in finding the issue and spitballing a solution, change was tested on both rclone mount and local filesystem with both working correctly