.txt files in res:// are lost during export

:information_source: Attention Topic was automatically imported from the old Question2Answer platform.
:bust_in_silhouette: Asked By gdnc

I’ve stored a bunch of .json and .txt files in subdirectories of res:// that represent data about the stages in my game. It runs fine when using F5 in the Godot editor, but when I export it, my game displays nothing at the points where it would have to read these files.

In the export menu, I’ve already added *.json, *.txt to the “Filters to export non-resource files”, to no avail. Any tips on troubleshooting this? If it’s relevant, I’m running ubuntu 18.04.1, and this bug happens with both the Linux/X11 preset and with the Windows Desktop preset (tested with wine).

:bust_in_silhouette: Reply From: gdnc

ah nevermind, figured it out. It’s related to this issue:

Swapping out a if not directory.dir_exists("res://path/to/dir") for if not directory.open("res://path/to/dir) == OK fixed it.