lutris / lutris

Lutris desktop client
https://lutris.net
GNU General Public License v3.0
7.72k stars 680 forks source link

MTGA just deleted all my folders and files #1878

Closed JBMarplot closed 5 years ago

JBMarplot commented 5 years ago

I was removing a game from Lutris because it did not work. I clicked on the game, scrolled to "remove" and a screen popped up with - "remove all data from game folder ( ~/Games/battlenet) and then for good measure I also selected the second option: Remove from my library.

Upon clicking "apply" this promptly wiped out every single folder and file on my desktop.

I have since tried to use Testdisk recovery, and though I am able to recover the files in "read-only" documents (these are almost entirely writing files of my personal creative writing), they are not the most up-to-date of which I delete today March 19th.

Why would this program have the capacity to delete every single file on my desktop?

This seems insane to me.

Any help on recovering my most recent edits from today would be incredibly helpful.

Thank you

tannisroot commented 5 years ago

Wow, I am so sorry this happened. I can assure you that this is not intended behavior. Do you mind telling if you changed anything in standard configuration? Like maybe "Create a wine sandbox for folders"? Also, which distribution do you use and which filesystem was the prefix installed on?

tannisroot commented 5 years ago

@strycore do you think you could make Lutris put things in trash instead of "rm -rf"-ing them to avoid stuff like this?

tannisroot commented 5 years ago

I think this can happen if your 'Desktop" folder was symlinked in the Wine prefix. But I am not sure that's what has caused it. Can you check if stuff in Documents and Pictures is gone too?

strycore commented 5 years ago

lutris uses shutil.rmtree to delete a folder, this does not follow symlinks (I double checked just now). If disabling wine sandboxing caused these kind of issues, we would have noticed earlier. something else must have linked the wine prefix to the actual user files.

JBMarplot commented 5 years ago

Hi Again,

So after some more looking around last night, I thought that maybe it had to do with the specific game--MTG Arena. Turns out, it has a super rare bug (which they are not reporting to people who try to download the BETA as far as I could tell) that when uninstalling it, it might wipe your computer...

So what I've figured out, is that, when I downloaded the game, instead of putting it in my home file, I put it in my desktop, and when I went to remove, I think that because I made "desktop" the location that the download went into, the extremely rare bug wiped everything in desktop.

I was able to recover my files up until March 11th of last week, which is helpful, but I am still trying to figure out what exactly I have completely lost.

As far as I am aware, I downloaded Lutris, it loaded Wine because I didn't have it or didn't have the correct version, and I didn't do much else than press "okay." I am not sure if it actually had anything to do with Lutris now since I saw the "bug" thread on WOTC about computers getting wiped. Though I will say, maybe Lutris could put a warning before people attempt to use MTG Arena explaining what happened to me, since WOTC is not making this precaution.

I don't know what "symlinked" means, and if this happened I don't know that I made this happen or how I would have made this happen. Stuff in Pictures and Downloads, etc, are all fine, it was just everything I had on my desktop.

Thanks for your help

tannisroot commented 5 years ago

Oh, ok! What a horrible bug. But I am very glad you recovered your files, at least partially. I will close this issue for now and add a note about MTGA installer to my To-Do list.

JBMarplot commented 5 years ago

Will do. Thanks!

strycore commented 5 years ago

Kinda knew it wasn't possible for Lutris to do that. I wish I knew more about the setup so it could be reproduced locally and possibly prevented in the future.

JBMarplot commented 5 years ago

Hey, I would love to help. What information do you need from me?

strycore commented 5 years ago

do you have a link to that specific MTGA bug? If I'm able to reproduce it in a VM, I may be able to find a solution to prevent such cases. Just hoping that it hasn't been fixed yet.

JBMarplot commented 5 years ago

Here is one link that I read: https://www.reddit.com/r/magicTCG/comments/9418t5/psa_the_magic_arena_installer_can_still_delete/

And: https://www.reddit.com/r/MagicArena/comments/97dexy/mtgarena_still_deleting_whole_file_systems/

Also, here is what is on MTGA forum: https://forums.mtgarena.com/forums/threads/34903?page=1

Let me know if you need anything else. Cheers!

strycore commented 5 years ago

ok, with that info, if someone can make reliable repro steps on a VM, that'd be enough to work on a fix.