You are here

TB portable deletes AppData Junctions

2 posts / 0 new
Last post
AK49BWL
Offline
Last seen: 4 years 7 months ago
Joined: 2020-04-01 07:14
TB portable deletes AppData Junctions

I just downloaded the latest (stable) version of Thunderbird from here this morning, ran it and was able to access all my email accounts just great, love this app, BUT! When I close the app, it erases my folder junctions for Firefox (which is installed on the computer, not a portable app), rendering Firefox unable to access my profile.

C:\Users\Administrator\AppData\Local\Mozilla points to D:\AppDataExt\Mozilla
C:\Users\Administrator\AppData\Roaming\Mozilla points to D:\AppDataExt\MozillaR

junctions created using mklink /j sourceLocation actualLocation

Thunderbird (Portable at least) deletes these links from the C drive AppData folders. Thankfully, it does not delete the profiles themselves on the D drive. Why is this the case, and can it be fixed? I realize it's simple to re-make the links but in my oh so humble opinion, this shouldn't be happening anyway.

John T. Haller
John T. Haller's picture
Offline
Last seen: 2 hours 48 min ago
AdminDeveloperModeratorTranslator
Joined: 2005-11-28 22:21
Windows API

The Windows API is kinda dumb and if you ask if if a junctioned directory is empty, it'll say yes even if there are files in it. More specifically, junctions are kinda 'half baked' in Windows which is why I recommend against using them, never do so myself, and will not release a portable app that requires them.

We use the builtin NSIS command to remove a directory only if empty which uses the Windows API which is broken for junctions. So, it gets removed. We may at some point in the future manually check for junctions on every directory remove, but we do not right now. So, right now, this is what will happen for shared directories within APPDATA and LOCALAPPDATA.

Note that this will not happen if you move your whole user profile, or APPDATA or LOCALAPPDATA

Sometimes, the impossible can become possible, if you're awesome!

Log in or register to post comments