+1 vote

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
* https://github.com/bitwes/Gut/releases/tag/v6.6.1
* https://github.com/bitwes/Gut
* https://github.com/bitwes/Gut/wiki

in Engine by (143 points)

Please log in or register to answer this question.

Welcome to Godot Engine Q&A, where you can ask questions and receive answers from other members of the community.

Please make sure to read Frequently asked questions and How to use this Q&A? before posting your first questions.
Social login is currently unavailable. If you've previously logged in with a Facebook or GitHub account, use the I forgot my password link in the login box to set a password for your account. If you still can't access your account, send an email to webmaster@godotengine.org with your username.