Details
-
Bug
-
Status: Closed
-
TBD
-
Resolution: Fixed
-
OpenMRS 1.9.8, Platform 1.9.9, Platform 1.10.2, Platform 1.11.4, Platform 2.0.0
-
None
Description
In the getApplicationDataDirectory we firstly use the systemProperty OPENMRS_APPLICATION_DATA_DIRECTORY which can be set by passing -D to the jvm, but this is not something we document anywhere. Instead most people try to create an environment variable, which will not work because we need to use getenv instead of getProperty
If this property is not found, the default path for Windows is user.home\Application Data, which not valid for Windows 10. This was valid for previous versions of Windows. Our default should be %APPDATA% for all windows, instead of using this as fallback. Even for the APPLICATION_DATA_DIRECTORY_FALLBACK_WIN we use System.getenv("%appdata%"), where as this should be System.getenv("appdata") because the %env% is to denote its an environment variable.