Skip to content
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

"Can't create LogFile" error when attempting to compile maps outside the Portal 2 directory since a recent update #430

Open
vrad-exe opened this issue Mar 24, 2024 · 0 comments

Comments

@vrad-exe
Copy link

Since a recent Portal 2 update, attempting to compile a map located anywhere outside of the Portal 2 directory will fail almost immediately producing an output similar to the following:

CDynamicFunction: Loading library 'Kernel32.dll' (76A90000)
CDynamicFunction: Lookup of 'TryEnterCriticalSection' in 'Kernel32.dll': 77900A20
Valve Software - vbsp.exe (Apr 18 2023)
20 threads
Can't create LogFile:"d:\games\steamlibrary\steamapps\common\console_map.log"

This is a major problem for modders who often need to store maps in a Git repository, cloud storage platform, or other location which cannot be easily relocated inside the Portal 2 directory.

The problem appears to be in the filesystem code, as replacing filesystem_stdio.dll with an old version allows the maps to compile again. My guess would be that one of the recent security patches implemented a check to prevent the game from writing files outside the intended locations as a safeguard for exploits, but whoever did that forgot that the map compilers are supposed to be able to write files anywhere. You'd probably need to implement the ability for this check to be bypassed in specific contexts.

This is potentially related to #403 as that issue can also be worked around by reverting the filesystem binary to an old version.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant