NathanVaughn / msfs-mod-manager

An external mod manager for the new Microsoft Flight Simulator
GNU General Public License v3.0
98 stars 4 forks source link

All my mods deleted #80

Open buden3000 opened 2 years ago

buden3000 commented 2 years ago

Expected Behavior

Not to delete my mods

Actual Behavior

Deleted every mod in the folder

Steps to Reproduce the Problem

1.Change install directory to one containing your mods (not the community but one where you store them while not in use)

Specifications

buden3000 commented 2 years ago

Just to add to this it's now going to take me hours to get all of these back as over 40gb of them are now gone..... why would you have your program delete the folder with no warning of it?

NathanVaughn commented 2 years ago

I'm sorry that this occurred, and that I've been delinquent in replying. I've been swamped working on a high school robotics competition, then took a 3 week vacation. I would like to remind you that I'm an aerospace engineer, and not a software engineer, and only get a chance to work on this in my free time. When you click the button to move the mod install folder, you should get a prompt telling you that this action is not recommended.

The mod install folder is the folder in which the mod manager installs mods to. This is NOT the same as the MSFS Community folder where the simulator expects mods from. This is handled for you automatically. !!! Only change this if you know what you're doing!!!

This is because once you accept this, this calls the files.move_folder function. The first thing this function does, is check if the destination directory exists. If so, it deletes the directory. This is usually desired behavior, for example when replacing a mod with a newer version. Then, it will copy the new files over. If this destination directory is the same as the source directory (or a symlink to it), then this will accidentally cause the source files to be deleted.

I will try to more thoroughly address this scenario in v2, currently on the rewrite branch now that I finally have time to work on it again.

buden3000 commented 2 years ago

just to clarify here - I didn't set the folder to be my community folder - i had another folder where i was keeping mods that i wanted to be where this application stored them. I really don't understand why you would need to be deleting a folder to just recreate it.

GregPug commented 2 years ago

I was just about to report the same issue but then came across this thread. Absolutely love this mod manager as it's the only one I know of that will automatically install mods, which saves a ton of time. But yes, the chance of losing everything is a serious drawback, and happened to me last night for I think the 3rd time in a year. Windows had frozen during a mod install, and the config file gotten corrupt, requiring me to delete that file in order to get the program to start again. When I'd done so, it had defaulted to the default mod_cache folder, which I then foolishly reset to my custom mod folder ... and that folder got emptied.

I see you're working on a fix, but perhaps even a very simple prompt notifying the user that changing the default mod storage folder will delete everything in the new folder [if anything is there] would serve to avoid this problem. Certainly would've helped me last night!

NathanVaughn commented 2 years ago

I'm sorry about this. My best recommendation is before doing any drastic operations like moving the installation folder, make a full backup first. I did try to handle the case that moving the mod folder to a new location that is actually the same directory, it will delete everything. I think I understand what you're doing that's causing this.

Unfortunately I've been lacking a lot of time and motivation lately considering since I first wrote this mod manager in college, my current full-time job is writing Python software all day. I'll see what I can do about dedicating some time to this, but it will definitely be a few weeks with some stuff going on in my life right now.

GregPug commented 2 years ago

Yep, no problem, still a big fan of your tool despite the loss.

Had a few different life choices been made, we might've crossed paths -- I finished an MS in Aero Engineering - Rotorcraft Aero -- at Univ of MD in 2001. Had offers from Boeing, Sikorsky, etc. but could never get a response out of Bell! I ended up going into space stuff anyway after that, and then since 2012 I switched careers out of engineering. Now the most technical thing I do is Excel, which is fiiiiiine by me.

Anyway, thanks for the reply.