File tree Expand file tree Collapse file tree 1 file changed +15
-1
lines changed
java/preprocessor/src/main/java/processing/app Expand file tree Collapse file tree 1 file changed +15
-1
lines changed Original file line number Diff line number Diff line change @@ -15,7 +15,21 @@ static public File getSettingsFolder() {
1515 }
1616 settingsFolder = new File (appData + "\\ Processing" );
1717 } else {
18- settingsFolder = new File (System .getProperty ("user.home" ) + "/.processing" );
18+ // Check to see if the user has set a different location for their config
19+ String configHomeEnv = System .getenv ("XDG_CONFIG_HOME" );
20+ if (configHomeEnv != null && !configHomeEnv .isBlank ()) {
21+ settingsFolder = new File (configHomeEnv );
22+ if (!settingsFolder .exists ()) {
23+ settingsFolder = null ; // don't use non-existent folder
24+ }
25+ }
26+ String snapUserCommon = System .getenv ("SNAP_USER_COMMON" );
27+ if (snapUserCommon != null && !snapUserCommon .isBlank ()) {
28+ settingsFolder = new File (snapUserCommon );
29+ }
30+ if (settingsFolder == null ) {
31+ settingsFolder = new File (System .getProperty ("user.home" ), ".config" );
32+ }
1933 }
2034 return settingsFolder ;
2135 }
You can’t perform that action at this time.
0 commit comments