-
-
Notifications
You must be signed in to change notification settings - Fork 242
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
Relative path handling in liblist.gam is insufficient and differs from vanilla #1909
Comments
Hm. We specifically remove upper directory access here, as none of user-facing DLLs are allowed to reference absolute paths or upper directories. While this works in GoldSrc, Xash in general quite strict about accessing absolute or upper paths through VFS as this might lead to undesired results. If you want to reference in DLL from another game directory, Not only that, Metamod-R for example specifically looks for its own path when loading configuration files. I don't know about original Metamod, because it doesn't seem to be really useful. |
I suspected possibility of a deliberate limitation, but why? Security? DLLs can execute arbitrary code anyways. I solved it by setting Why I bother with old Alright, my current problem is kinda solved. If you believe nothing needs to be improved about handling of these files, then you can close the issue. (For example, there's minor jank with |
In case of DLLs, I believe it's less of a security issue but rather some assumptions on how GoldSrc loads libraries in original Xash. In our case, it might cause a problem when the game info wants An alternative to this might be excluding DLLs from mod subdirectories like this, but I'm not sure if somebody might already rely on this feature. I'm using that myself to not clutter game directory with modded data, but never put DLLs there. As about |
That way if someone uses Another thing if we started talking about |
Yeah, I know, Xash should've just extended I thought of a simpler behavior that if
|
There is a better-than-typical metamod setup that involves putting it into game's root directory, like that:
And into
liblist.gam
goes relative path to it like that:gamedll "..\metamod\metamod.dll"
It's better because there's no need to copy it into every mod directory. Easier to update and maintain.
Works in vanilla, but in Xash3D:
Changing backslashes does nothing. I did some experiments and concluded that relative path handling is lackluster.
gamedll "dlls\metamod.dll"
- Works.gamedll ".\dlls\metamod.dll"
- Curiously, works.gamedll ".\.\dlls\metamod.dll"
- When this doesn't.These three are equivalent and valid paths in original engine. They all should work along with parent dir
..\
prefix.The text was updated successfully, but these errors were encountered: