You are here

Cleaning up Data

4 posts / 0 new
Last post
Shawn Faucher
Shawn Faucher's picture
Offline
Last seen: 14 years 7 months ago
Developer
Joined: 2007-10-23 22:14
Cleaning up Data

What's the recommendation for whether to have an installer clean up the Data directory? For example GnuCash Portable no longer requires a subfolder within Data that used to be necessary to fix a bug. The installer deletes this subfolder from DefaultData. Should it do the same for Data, or is it preferable never to touch the Data directory during installation?

If the installer shouldn't touch it, what about the launcher? Should it do any cleanup of Data that isn't needed any longer, or just ignore it?

wraithdu
Offline
Last seen: 10 years 9 months ago
Developer
Joined: 2007-06-27 20:22
According to the

According to the PortableApps Platform spec, the Data\settings directory is where all program settings should be kept when the program is not running. So any INI, XML, CFG, whatever files should be moved there upon program closing. That's also where you'd keep any exported registry settings.

Are you saying you're program has no configuration files or registry settings at all? If not, I'd still keep the directory (although empty) to comply with the spec.

Shawn Faucher
Shawn Faucher's picture
Offline
Last seen: 14 years 7 months ago
Developer
Joined: 2007-10-23 22:14
RE: According...

I'm talking about a subfolder of Data, not Data itself. In this case it's a subfolder containing fixes that are applied by the launcher depending on the OS of the machine currently running the app. The reason these fixes aren't in settings is because there are multiple versions of files with the same name, thus they can't all reside in one directory without a ton of renaming going on. These fixes are no longer needed in the new version of the app.

It could be argued that the subfolder should be under settings instead of directly under Data, but that's beside the point. My question is should Data and it's subfolders be "sacred user data" and not touched by the installer (only DefaultData)? Should even the launcher refrain from deleting things from Data for fear of losing user data?

formerly rayven01

John T. Haller
John T. Haller's picture
Online
Last seen: 32 min 18 sec ago
AdminDeveloperModeratorTranslator
Joined: 2005-11-28 22:21
Data = User

The Data directory is for user data as well as for settings for the launcher (tracking the last run drive letter, etc). An installer or launcher can update the files within for upgrades, etc, but should not remove or overwrite actual user data and settings.

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

Log in or register to post comments