Horrible bug when creating android bundle that deletes a folder without warning! (DEF-2628) (SOLVED)

I have just bundled my apk for the first time. I chose as the name of the apk the same name and path of a folder in which I had all my original material for the app. I expected the procedure to create a file, let’s say foo.apk at the same level of my foo folder. I was shocked to discover that, instead of this, the procedure completly DELETED my foo folder and created a NEW foo folder with foo.apk inside, without no warning or asking for “are you sure to overwrite…”. I had no backup of this folder and files are lost forever.
I understand Defold is in beta, but this is an absolute beginner programming mistake.

We are incredibly sorry that this happened to you and will investigate and fix this issue first thing today. There is really no valid excuse for bugs like these.

2 Likes

If you are on macOS chances are that time machine has a local snapshot of your files.

1 Like

Very sorry that you had to experienced this! I’m looking into this at the moment, adding issue id to topic: DEF-2628

2 Likes

That’s awful.
@sven how about a reminder of some sort - “you haven’t synced your project for 1 day (or so), backups ensure you don’t lose your progress”. With an option to disable the reminder.

You can extract the APK and restore some files. Lua code is converted to bytecode, which in theory can be converted back to Lua code (it won’t be exact).

It didn’t affect my Project directory (which I sync very often) but a different directory that is not a git repo.

I see. As a matter of fact, I usually recommend people storing such materials either in Google Drive (prevents accidental removal) or in a bitbucket repo (complete versioning).

Thanks unfortunately I use Windows, I will try to recover files with a undelete utility.

I already reported this bug. I had to recreate my assets because of this. Not very nice feature though. :frowning:

2 Likes

This bug has been reported in Nov '16 and it’s still not fixed???

Unfortunately, yes. We added it to the Editor 2 issues list but missed to get it down for Editor 1.

This issue has been fixed in Defold 1.2.102.

3 Likes