View Issue Details
|ID||Project||Category||View Status||Date Submitted||Last Update|
|0030261||Runner||Ubuntu||Public||2018-11-29 10:23||2018-11-30 09:44|
|Priority||Low||Severity||C - General||Reproducibility||100%|
|Platform||-||OS||Windows 10||OS Version||Pro x64|
|Target Version||Fixed in Version|
|Summary||0030261: Ubuntu: working_directory value can be modified by extensions using chdir()|
|Description||On Linux, when I change the current directory with the C++ function chdir(), it should only effect my extension's working directory, not the actual game's working directory, because the game is supposed to be sandboxed. Using this function on Mac, my extension suffers no issues because the extension's working directory and the game's working directory remain two different internal variables. The same is also true with the Windows C++ equivalent function SetCurrentDirectory(). This is not so on Linux. While calling chdir() does not change the value of the game's working_directory, (which is always equal to "assets/"), chdir() does in fact change the absolute path that game looks for that "assets" folder.|
Once the directory is changed using that function on Linux, the extension can no longer be used in-game, because the SO library can no longer be read, neither can the rest of the included files. This is not an issue on Windows and Mac.
In the sample MP resource, look for the source code concerning the "set_working_directory" function, which uses SetCurrentDirectory() on Windows, and chdir() on Mac and Linux.
|Steps To Reproduce||1. Start GMS2.|
2. Import http://marketplace.yoyogames.com/assets/6621/dialog-module
3. Run it on Ubuntu
|1.4 Found In|
|2.x Runtime Found In||18.104.22.168|
|2.x Runtime Verified In|