-
-
Notifications
You must be signed in to change notification settings - Fork 290
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
uvfs support for CET with MO2 #877
Conversation
Thinking about the checks a bit more. One simple alternative to the rather complicated path checking in the PR could also be just to get the lexically_relative path between the filePath and the currentDir if uvfs is detected - and for safety we could check the input lua path for "..//". |
Eh, checking for .. is sketchy, they may be valid cases (like when mod from some of its subfolder does something with parent) Dont think that is a good solution. |
And on top, it may appear in the middle of the path potentially and you could still escape sth/../../yey |
I think this looks good apart from the few commented out stuff at least on first glance... I'd rather have a more proper look in like an hour though cause cant discern changes to the GetLuaPath as you moved + changed it in same commit. |
6989b4c
to
ad1438f
Compare
The problem
When launching the game through Mod Organizer 2, CET mods don't work
That is because
Any mod that creates files at runtime (that is ALL CET mods since the sandbox db gets created at runtime) will fail since the "overwrite" directory escapes the mod sandbox.
This PR
This PR does two things:
usvfs_x64.dll
)Since
GetLuaPath
does more checks now, I needed to move it out of utils into sandbox.This also incurred pulling the sandbox into more lambdas.
Pros and Cons
Pros:
Cons: