dir_exists() does not function correctly when operating on res:// paths in editor

Godot Version

3.6

Question

I work on mods for a game (ΔV: Rings of Saturn), and one very common function I use checks for files that have been loaded to the res:// path using Directiory.dir_exists() and Directory.file_exists(). It used to work absolutely fine in the editor up until about a week ago (it still functions perfectly fine when loaded as a mod on a release build, however, as you’d assume, developing like that is very suboptimal). The game did do an update from 3.5 to 3.6 a month or two ago; however, it was still functional after the change, and something that has only appeared recently, after what I presume was an update to the game.

Does anyone know of anything that might cause this, ProjectSetting-related or otherwise?

I’m going to do a decompile of the last few versions of the game on the whim that it’s something introduced via an update, but if anyone has any insights into something specific, that would be very helpful.

Perhaps the editor/export/convert_text_resources_to_binary setting, which will disable access to the project filesystem. After all, it is convert text resources to binary.

By the way, it’s better to view the source changes in the Git repository of Godot, rather than decompiling the code.

sorry for the late response and all, but a few problems with this solution:

A) convert_text_resources_to_binary might work for release builds, however it’s specifically release builds that work. This problem only ever happens when launching directly from the editor
B) I would use direct source if i could, however the game is closed source so a decompilation is the best i can achieve

This problem will on some occasions work, or fail to work. I’m yet to find any specific cause for it

Ok, i figured out what the issue is. If any files are added to the filesystem via ProjectSettings.load_resource_pack(), File fails to operate on the res:// filesystem