You are here

PortableApps deletes app directory on update, including config/data files. Ouch.

8 posts / 0 new
Last post
chemazapiens
Offline
Last seen: 4 years 9 months ago
Joined: 2019-07-04 21:21
PortableApps deletes app directory on update, including config/data files. Ouch.

Hi,

I just found out, the hard way, that PortableApps deletes app directory on update, including config/data files. Ouch.

This is nothing new, apparently:
https://portableapps.com/node/58211
https://portableapps.com/node/43334
etc.

I'm a light user of the platform, and I lost only a pair of hours of work or so (though it's going to be challenging to remember all the things lost, actually).

Fixing the apps to use a more sensible place to save config/data is too much work, understandably, but might I suggest you at least display a very big warning before updating, with a link to a page with apps known to lose data? In my case the main hurt was Balabolka.

Cheers and thanks for such useful project!

John T. Haller
John T. Haller's picture
Online
Last seen: 37 min 5 sec ago
AdminDeveloperModeratorTranslator
Joined: 2005-11-28 22:21
How and what?

Sorry to hear. How did you lose it and what did you lose exactly?

The App directory is like Program Files on your local drive. There's even a note in the App directory to this effect. Every app we are able to, we default it to either your X:\Documents or X:\ directory or, barring that, the Data directory for the app. In Balabolka's case, the default is your local Documents directory to save files. I'm not quite sure how you could have manually selected the BalabolkaPortable\App directory from there.

The Balabolka config is moved to App to run and back on exit, so as long as you exited normally, everything is fine. If you exited improperly (pulling a USB drive or shutting down Windows which will crash the app) the app will warn you on next launch that you're risking your data by doing that.

That said, I've added an installer exclusion on the balabolka.pcfg for users who crash the app and then upgrade without running to let the app recover. It'll be included in the next release.

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

chemazapiens
Offline
Last seen: 4 years 9 months ago
Joined: 2019-07-04 21:21
I lost (1) my config, and

I lost (1) my config, and worse, (2) dictionaries of text replacements/pronunciation corrections.

1) I pinned Balaboka to the taskbar (right click->pin), so now I realise I've been running App\Balabolka\balabolka.exe directly. I received no warning on update, since I didn't exit the launcher improperly. I just didn't run it!

2) New dictionaries are saved to App\Balabolka\dictionaries, the program doesn't let you choose a directory. You could implement the file swap to save those to Data\ I guess...

...unless you pin the program to the task bar, in which case it will just not happen. With this or any other Portable App.

So you see: I never manually selected a directory; I did pin the program, since I had no idea that such common action was dangerous. But even if I hadn't, it seems to me the dictionaries would have been lost. I had no idea the directory would be wiped on updating.

I never really appreciated how risky this portable business is. I change my suggestion to rather warn the user against pinning/running the app directly; repeatedly, as a notification or whatever (*except* as a vague readme.txt which I'm not going to find until things break). And to detect/correct/give the user an electrical discharge whenever a direct shortcut to an app is created. xD

But education takes time. And organic learners are efficient, which entails forgetting and making mistakes. Hashing files on install/update and detecting new or modified files on update would be an easy and effective safe ward, me thinks.

Cheers!

John T. Haller
John T. Haller's picture
Online
Last seen: 37 min 5 sec ago
AdminDeveloperModeratorTranslator
Joined: 2005-11-28 22:21
Pinning

Windows' pinning abilities are limited and don't understand multi-EXE apps and can only pin and launch the final EXE that is run without any command line options. This applies to all apps whether local or portable. It's a known bug that Microsoft is unlikely to fix.

You can pin apps that support it in the PortableApps.com Platform, though, as we use a workaround. The platform doesn't yet have a 'welcome to portable software, here's some stuff you should know' intro but will at some point in the future. It's just some work to get it in the 58 languages we support.

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

chemazapiens
Offline
Last seen: 4 years 9 months ago
Joined: 2019-07-04 21:21
I'm painfully aware of that,

I'm painfully aware of that, as I've struggled to pin other programs that use loaders. Now, if such a common action like pinning a program has a data loss potential, I would err on the side of caution and warn the user in advance, several times, in English or an automated translation at least. I'd rather read a crappy translation than lose data.

But education --never mind translation-- takes time and we're not perfect anyway --even us code monkeys! So an automated fail back would also be great: quick checksum on install/update, ask me when something new or modified is going to be deleted on update. Even better, you could do this same thing when doing the file swap, so you could also detect and prevent data loss in such case (which I suspect is more common?).

Just my 2 pennies. I learned my lesson, myself. And installed Balabolka with the normal installer afterwards. xD (not because of this, but because the update also broke exporting audio in any format except WAV).

John T. Haller
John T. Haller's picture
Online
Last seen: 37 min 5 sec ago
AdminDeveloperModeratorTranslator
Joined: 2005-11-28 22:21
Windows Itself

Unfortunately, we don't know when you've pinned an app if you do it outside the PortableApps.com Platform as that's handled by Windows itself. The most we can do is add a guide on first use that warns you to pin only through the platform.

As for upgrades, we generally have allowances for things that are normally moved back and forth like the Balabolka config file I mentioned above. That will be preserved on upgrades even if you run it directly from a pin from the next version forward. I'm usually proactive about these. As for other random files saved in the App directory, that's tougher to handle. We have over 400 hundred different apps and they all work differently with different settings and file formats.

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

chemazapiens
Offline
Last seen: 4 years 9 months ago
Joined: 2019-07-04 21:21
The most we can do is add a

The most we can do is add a guide on first use that warns you to pin only through the platform.
That would be a good start!

As for other random files saved in the App directory, that's tougher to handle.
I entirely understand. But I think an automated checksum or some such fail-back would be easy enough to implement once, and it would cover all 400+ apps and all that are to come in this wonderful platform (here's to it reaching 1k someday!)

If you have a public wishlist, I'd be happy to copy my suggestions there. In any case, I'll stop pestering you now. Cheers and thanks for replying. Smile

John T. Haller
John T. Haller's picture
Online
Last seen: 37 min 5 sec ago
AdminDeveloperModeratorTranslator
Joined: 2005-11-28 22:21
User Changes

There are lots of apps that allow specific changes to add themes, plugins, hack things, change root settings, etc. We make allowances in the installer to preserve these on upgrades in addition to the allowances for files moved back and forth. Hashing a full app can take a while, especially on a slower drive. LibreOffice is 17,000+ files across nearly 1,700 folders. And those little things users add would prevent us from pre-hashing a lot of the apps.

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

Log in or register to post comments