godot icon indicating copy to clipboard operation
godot copied to clipboard

Script content gets deleted when running game with low hard drive space

Open TheRubeThing opened this issue 4 years ago • 3 comments

Godot version:

v3.2.2 stable official

OS/device including version:

macbook pro retina 13 inch late 2013, macOS 10.12.6

Issue description:

Trying to run game using cmd-B an error appeared with saving and the contents of on of the scripts was completely deleted. The script file still remains but without any code in it.

Steps to reproduce: When on very low hard drive space. Try to simply run a game and on some error to save the contents of a file could be overwritten with an empty file of the same name.

Minimal reproduction project:

TheRubeThing avatar Oct 03 '20 23:10 TheRubeThing

I'm not sure if we can do much about this, other than displaying a dialog in the editor if the partition the project is stored on has very little space remaining (< 500 MB).

In general, it's not a good idea to leave your boot partition with less than 500 MB remaining. Your PC might become unbootable the next time you try to boot it…

Calinou avatar Oct 04 '20 13:10 Calinou

Yep, Godot ate my files. This has happened to me twice (and never again), the second time it ate a large .tscn file and a .gd file, making them 0 kb. I even tried data recovery software as my backups were a week old.

I strongly suggest when saving that Godot should detect the hard drive space and PREVENT saving if there's no space. Tell the user to go get some space first.

This issue has some seriously catastrophic consequences.

rainlizard avatar Nov 11 '21 06:11 rainlizard

Maybe write to another file first and then rename? I believe that's the standard solution. Seems super dangerous otherwise.

Clonkex avatar Mar 08 '23 07:03 Clonkex

Closing in favor of https://github.com/godotengine/godot/issues/45354, which has more information about the issue at hand.

Calinou avatar Jun 28 '23 09:06 Calinou