Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Chainner update deleted all my *.chn files #1756

Closed
avviano opened this issue Apr 21, 2023 · 7 comments
Closed

Chainner update deleted all my *.chn files #1756

avviano opened this issue Apr 21, 2023 · 7 comments
Labels
bug Something isn't working

Comments

@avviano
Copy link

avviano commented Apr 21, 2023

I updated to the new chainner via windows exe file. All my CHN files (and I had alot of them) are all wiped out now. Where are they????

@avviano avviano added the bug Something isn't working label Apr 21, 2023
@joeyballentine
Copy link
Member

Where were you saving them to? Chainner should not have touched any directory other than it's installation location (which if i remember correctly is in appdata/local/chainner). If you were storing your chain files there, this is a life lesson not to store project files where a program is installed to. If not, I'm interested to know how this happened

@avviano
Copy link
Author

avviano commented Apr 21, 2023

I saved it in the folder that Chainner brings up by default when you click save. Which was appdata/local/chainner. When I started the installer, I saw all the contents in the folder disappear and then the new files re-appear. Although this is called an update, it did not just update or overwrite existing files, but wiped out the whole directory. It seems that there is a delete command in the installer, which make absolute zero sense. I now lost one week of work. Oh man....

@joeyballentine
Copy link
Member

Well, this definitely highlights that the default directory it opens for that should not be appdata/local/chainner.

As for how it's updating, that's just the way the electron installer we use works. There's nothing i can do about that.

Sorry about your chn files, that really sucks. Afaik there isn't any way to recover those. I'll see about getting that default directory changed ASAP

@avviano
Copy link
Author

avviano commented Apr 21, 2023

Your installer should also prompt users and inform them before wiping it off their harddrives. Quit honestly, I never saw an app delete a folder for an update before. That is totally new to me... In theory, you just need to overwrite existing files, or install to a new version folder (like Adobe and most other apps do it - for exactly that reason). Deleting anything on users machine without prompting is not best practise.

@avviano
Copy link
Author

avviano commented Apr 21, 2023

Anyway, thank you for creating an awesome product. I am sure you will get it fixed. I will just have to cut my losses.... Anyone reading this, make sure to backup all your *.chn files and dont keep them in your app directory.

@avviano avviano closed this as completed Apr 21, 2023
@joeyballentine
Copy link
Member

I guarantee you nearly every other program on your computer updates in a similar way to this. How do you expect something to update if it's not replacing the original file? Yes patching exists but that's a lot more difficult of a process and is more prone to breaking. And if you're thinking "that can't be", you've just never noticed because you haven't been saving things to their application directories, and they don't prompt you before deleting either.

As for prompting and informing users, I'd love to do that but i literally can't. I've tried so many different ways to prompt the user after an update is finished but literally nothing works. The installer we use is pretty garbage in that regard.

Btw, it's the same installer Discord uses. It's called Squirrel. Feel free to look at whatever documentation related to how it updates you want.

I get you're angry about this, but it's not like I made the intentional decision of making you save your files to a particular folder, and then programmed it to delete the files in that folder. You just discovered an unfortunate combination of the save window defaulting to the exe directory and the way the updater works.

Glad you like chaiNNer, and i hope it's not too much of a pain to recreate all your chains.

@avviano
Copy link
Author

avviano commented Apr 21, 2023

If it deletes the folder first, then its technically not an update / upgrade but a fresh install. Anyway, it seems that other users have had this issue with squirrel, which you can read here:

Squirrel/Squirrel.Windows#1630

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

2 participants