Attention | Topic was automatically imported from the old Question2Answer platform. | |
Asked By | bitwes |
Issue 95 is a doozy and can clear files in res://
. I haven’t seen this happen in the wild but it did happen a couple times when running the the Gut test suite and only when running the doubler tests (test_doubler.gd
).
Evidently I got lazy and forgot to check output from opening a directory.
var dir = Directory.new()
dir.open(_output_dir)
<delete everything in dir>
Here’s what I should have done:
var d = Directory.new()
var result = d.open(_output_dir)
if(result == OK):
<delete everything in dir>
The error resulted in the directory opened being res://
which I then proceed to delete all the files in the root of the project. The error returned was 31
and I’m not 100% sure why it happens but I figured I could sort that out after the fix was up.
Always check those returns.
Release Notes:
- Issue 60: Improved signal assert failure messages in some cases by having them include a list of signals that were emitted for the object.
- Issue 88: Fixed issue where you couldn’t specify the config_file from the command line.
- Issue 95: Fixed issue where sometimes Gut can end up clearing files from
res:\\
when using doubling.
Forgot the links