cleidigh / Localfolder-TB

Thunderbird Add-On to add additional local folders to accounts
Mozilla Public License 2.0
14 stars 6 forks source link

risk of data loss #76

Open Simplenuity opened 9 months ago

Simplenuity commented 9 months ago

Thanks, @cleidigh for this very helpfull add-on!

I'd like to recommend that during account creation the chosen Local Directory is tested for being empty.

If not empty, the user should be warned about potential data loss! In the current state the add-on will overwrite any file or sub directory with the same name in that chosen Local Directory.

Example: If home directory would be chosen that contains on most Linux distributions by default a sub directory Templates and Templates is activated to be created when setting up a new Local Folders account, the Templates directory will be wiped and replaced by an empty file Templates!

In addition a further aspect might need to be addressed to avoid data loss - sorry haven't been able to consciously*) test it yet: What happens if during setup of a new Local Folders account the Local Directory field is left blank? I have the suspicion that the add-on still carries on creating an account - and is using the home directory!

Thank you for your consideration

*) The mentioned example above actually happened to me and I can't remember having my home directory chosen as Local Directory. The probability that I left the field empty is much higher...

cleidigh commented 9 months ago

@Simplenuity Sorry for the delay, Iholidays plus a bonus covid round...

You are spot on. I need to add some form of warning and or options to deal with existing directory . I'll add it to the todo list %-) @cleidigh

cleidigh commented 5 months ago

@Simplenuity I hope you are still using Thunderbird and LocalFolders. I have finally gotten to address this and have beta for 115 & 128 below.

I now scan the directory for existing special folders. I then display a dialog indicating they will be retained except Trash and Unsent Messages. I also note the restart of Thunderbird to index. I'm hoping at some point to avoid that.

Anyway if you are interested in testing, your feedback would be great. https://github.com/cleidigh/Localfolder-TB/issues/81

Thanks @cleidigh

Simplenuity commented 4 months ago

Hi @cleidigh, Thanks for your efforts. I'll test it as soon as I get around to it and report back

cleidigh commented 4 months ago

@Simplenuity Excellent, thanks! BUT, hold off until I post b2. I finally figured out how to import and index the new folders without a restart! @cleidigh

cleidigh commented 4 months ago

@Simplenuity Ok just posted b2. It imports existing mbox folders and indexes without needing a restart. Christopher

Simplenuity commented 4 months ago

Hi Christopher (@cleidigh) Many thanks!

I've run a few tests and can confirm:

When setting up a new Local Folder account:

After setup:

That's a huge improvement, great work!

cleidigh commented 4 months ago

@Simplenuity Thanks for the testing and kudos!

I had to do maildir as well. I also added cancel to the existing folders dialog. Translations and cleanup and will be good to go. Thanks again Christopher