Description
On Windows GMRT / GMRT VM 0.21.0, writes to the sandbox save folder fail even when using a relative filename. The same code works on GMS2 VM and YYC.
game_save_id is correct and directory_exists(game_save_id) returns 1. Writing "options.json" or file_text_open_write("options_probe.txt") logs:
Not allowing file operation with filename 'C:\Users<user>\AppData\Local<game>\options.json'.
Error: Failed to create directories for '': The system cannot find the path specified.
file_text_open_write returns handle 1, but file_exists is 0 and no file is created.
The same failure happens with a subfolder (directory_create("cfg"), "cfg/options_probe.txt").
Writing to working_directory + "options_probe.txt" (GMRT build assets folder) is remapped to C:\Users<user>\AppData\Local<game>\assets\options_probe.txt and also blocked.
“Disable file system sandbox” does not change this.
This is not issue #13698. That ticket is sandbox-off still blocking paths outside the save area. Here, relative names inside the save area are rejected.
Expected change:
buffer_save(buf, "options.json"), file_text_open_write("options.json"), and directory_create("cfg") should create files/folders under game_save_id, matching GMS2 VM/YYC. A relative filename should not trigger create directories for ''.
Steps To Reproduce
- GameMaker LTS 2026, GMRT 0.21.0 via Package Manager.
- Target Windows --> GMRT VM.
- New empty project, one object, Create event:
show_debug_message("save dir = " + game_save_id);
show_debug_message("dir exists = " + string(directory_exists(game_save_id)));
var _probe = file_text_open_write("options_probe.txt");
show_debug_message("probe handle = " + string(_probe));
if (_probe != -1)
{
file_text_write_string(_probe, "ok");
file_text_close(_probe);
}
show_debug_message("probe exists = " + string(file_exists("options_probe.txt")));
- Run. File is not created; log shows the errors above.
- Run the same project on Windows VM. The file is created under %LOCALAPPDATA%<game>.
Always reproduces. OS: Windows. Platform: Windows GMRT VM.
Untested on other platforms.
Which version of GMRT are you reporting this issue for?
IDE v2026.0.0.16 GMRT 0.16.0
Which operating system(s) are you seeing the problem on?
Windows 10.0.26200.0
Which platform(s) are you seeing the problem on?
Windows
Attached Files
09d41cf8-9823-4cdf-9086-4c005fccbe4b
Description
On Windows GMRT / GMRT VM 0.21.0, writes to the sandbox save folder fail even when using a relative filename. The same code works on GMS2 VM and YYC.
game_save_id is correct and directory_exists(game_save_id) returns 1. Writing "options.json" or file_text_open_write("options_probe.txt") logs:
Not allowing file operation with filename 'C:\Users<user>\AppData\Local<game>\options.json'.
Error: Failed to create directories for '': The system cannot find the path specified.
file_text_open_write returns handle 1, but file_exists is 0 and no file is created.
The same failure happens with a subfolder (directory_create("cfg"), "cfg/options_probe.txt").
Writing to working_directory + "options_probe.txt" (GMRT build assets folder) is remapped to C:\Users<user>\AppData\Local<game>\assets\options_probe.txt and also blocked.
“Disable file system sandbox” does not change this.
This is not issue #13698. That ticket is sandbox-off still blocking paths outside the save area. Here, relative names inside the save area are rejected.
Expected change:
buffer_save(buf, "options.json"), file_text_open_write("options.json"), and directory_create("cfg") should create files/folders under game_save_id, matching GMS2 VM/YYC. A relative filename should not trigger create directories for ''.
Steps To Reproduce
show_debug_message("save dir = " + game_save_id);
show_debug_message("dir exists = " + string(directory_exists(game_save_id)));
var _probe = file_text_open_write("options_probe.txt");
show_debug_message("probe handle = " + string(_probe));
if (_probe != -1)
{
file_text_write_string(_probe, "ok");
file_text_close(_probe);
}
show_debug_message("probe exists = " + string(file_exists("options_probe.txt")));
Always reproduces. OS: Windows. Platform: Windows GMRT VM.
Untested on other platforms.
Which version of GMRT are you reporting this issue for?
IDE v2026.0.0.16 GMRT 0.16.0
Which operating system(s) are you seeing the problem on?
Windows 10.0.26200.0
Which platform(s) are you seeing the problem on?
Windows
Attached Files
09d41cf8-9823-4cdf-9086-4c005fccbe4b