#10026 closed enhancement (fixed)
Preferences, user data and caches should be stored in the appropriate places on Mac OS X
Reported by: | Stereo | Owned by: | team |
---|---|---|---|
Priority: | normal | Milestone: | 14.12 |
Component: | Core | Version: | |
Keywords: | macosx | Cc: | lists@…, cquest |
Description
Appropriate Mac OS X places would be ~/Library/Preferences/JOSM/ for preferences, ~/Library/Application Support/JOSM/ for stuff like plug-ins, ~/Library/Caches/JOSM/ for caches.
Old ~/.josm directories, if they exist, should be automatically migrated. If the target directories already exist, the user should get an error.
I don't know if plugins will need to be updated for this.
See https://developer.apple.com/library/mac/qa/qa1170/ for Apple's guidance on this.
Attachments (0)
Change History (21)
comment:1 by , 11 years ago
Type: | defect → enhancement |
---|
comment:2 by , 11 years ago
Milestone: | → 14.08 |
---|
comment:3 by , 10 years ago
Cc: | added |
---|
comment:4 by , 10 years ago
Milestone: | 14.08 → 14.09 |
---|
comment:5 by , 10 years ago
Keywords: | macosx added; mac osx removed |
---|
comment:6 by , 10 years ago
Milestone: | 14.09 → 14.10 |
---|
Move complicated/risky tickets to next milestone.
comment:7 by , 10 years ago
Milestone: | 14.10 → 14.11 |
---|
Not enough time/resources for these tickets this month.
comment:8 by , 10 years ago
Milestone: | 14.11 → 14.12 |
---|
follow-up: 15 comment:13 by , 10 years ago
Cc: | added |
---|
Guys, can you please test with JOSM latest that all works as expected, including the migration? I haven't tested it.
comment:14 by , 10 years ago
getDefaultUserDataDirectory()
currently points to ~/Library/Application Support/JOSM
. The linked document states, that this directory should not be used for irreplaceable user data. So it is not a good location for autosave data. This should go to ~/Library/JOSM
.
Comparing the Mac specification to the Linux XDG scheme (see #6664), the cache folder ~/.cache/JOSM
corresponds to ~/Library/Caches/JOSM
. The preferences folder ~/.config/josm/
corresponds to ~/Library/Preferences/JOSM
and the folder for user specific data
~/.local/share/josm
corresponds to ~/Library/JOSM
.
The Mac folder ~/Library/Application Support/JOSM
has no counterpart in XDG. It could be used to store resources like the plugin jar files. For simplicity's sake, I would suggest to ignore this directory and put all application support data in the user data folder (~/Library/JOSM
).
comment:15 by , 10 years ago
Replying to Don-vip:
Guys, can you please test with JOSM latest that all works as expected, including the migration? I haven't tested it.
The migration is called after the preferences have been loaded. I guess it is intended to run it earlier.
comment:16 by , 10 years ago
I wasn't sure about ~/Library/Application Support/JOSM
. I agree ~/Library/JOSM
would be simpler.
I thought preferences were loaded after platform prestartup hook? I need to check again.
comment:18 by , 10 years ago
Resolution: | fixed |
---|---|
Status: | closed → reopened |
TODO: call migration before preferences are loaded
comment:19 by , 10 years ago
Resolution: | → fixed |
---|---|
Status: | reopened → closed |
This is already the case, see MainApplication:
// call the really early hook before we do anything else Main.platform.preStartupHook(); // <---- migration called here Main.commandLineArgs = Utils.copyArray(argArray); if (args.containsKey(Option.VERSION)) { System.out.println(Version.getInstance().getAgentString()); System.exit(0); } if (args.containsKey(Option.DEBUG) || args.containsKey(Option.TRACE)) { // Enable JOSM debug level logLevel = 4; Main.info(tr("Printing debugging messages to console")); } if (args.containsKey(Option.TRACE)) { // Enable JOSM debug level logLevel = 5; // Enable debug in OAuth signpost via system preference, but only at trace level Preferences.updateSystemProperty("debug", "true"); Main.info(tr("Enabled detailed debug level (trace)")); } Main.pref.init(args.containsKey(Option.RESET_PREFERENCES)); // <---- preferences loaded here
comment:20 by , 10 years ago
Ah okay, I thought Main.initApplicationPreferences
would initialize the preferences...
move imagery cache tickets to next milestone