A user of my app has reported that it fails to save to dataPath(“settings.xml”) when it is still in the download folder, due to permissions. Apparently dataPath() points to an odd directory. Ideas?
- App saves settings to dataPath(“settings.xml”). Should expand to “app path/app name/Contents/Java/data/settings.xml”
- Settings are saved for the first time in settings() to generate the file
- This fails with a permissions error. At that time, my app was in the download folder. I assume ~/Downloads/… (don’t know)
- Curiously, the non-permitted path in the exception is not ~/Downloads/… but something like /private/var… (user coulnd’t remember)
I’m no Mac expert. I googled /private/var… and it seems to be a temp path for app store downloads. Which I do not use, it’s distributed as zip. Is there any way a downloaded, unzipped app could lead to dataPath() pointing to a non-writable directory under /private? Maybe antivirus software?