christofmuc / KnobKraft-orm

The KnobKraft Orm - The free modern cross-platform MIDI Sysex Librarian
GNU Affero General Public License v3.0
184 stars 23 forks source link

Files are created in weird locations (for Linux) #320

Open christofmuc opened 2 months ago

christofmuc commented 2 months ago

Again from @fractalf, the observation is:

Files on /home/user

After running the binary I see these folders created

~/.config/KnobKraft ~/KnobKraft-Adaptations ~/KnobKraftOrm

The first is ofc totally fine, but creating those other folders on the root of the home folder is pretty bad practice on a Linux system. You should consider moving them to ~/Documents/KnobKraft or something like that.

christofmuc commented 2 months ago

My comment was:

Yes, the files are very Unlinuxy. The code from JUCE is trying to be portable. let's have a look:

/** The folder in which applications store their persistent user-specific settings.
    On Windows, this might be "\Documents and Settings\username\Application Data".
    On the Mac, it might be "~/Library". If you're going to store your settings in here,
    always create your own sub-folder to put them in, to avoid making a mess.
    On GNU/Linux it is "~/.config".
*/
userApplicationDataDirectory,

/** A place to put documents which are shared by all users of the machine.
    On Windows this may be somewhere like "C:\Users\Public\Documents", on OSX it
    will be something like "/Users/Shared". Other OSes may have no such concept
    though, so be careful.
*/
commonDocumentsDirectory,

So the Linux ~/Documents is not implemented by the Library. That's probably why I used the userHomeDirectory instead.

I am not really sure why it is creating a ~/KnobKraftOrm directory. What's in there?