@@ -40,8 +40,6 @@ public class CrossPlatformOperations
4040 /// </summary>
4141 public static readonly string LINUXXDGCONFIG = Environment . GetEnvironmentVariable ( "XDG_CONFIG_HOME" ) ;
4242
43- // Config for linux systems will be saved in XDG_CONFIG_HOME/AM2RLauncher (or if empty, ~/.config)
44- // Config for mac systems will be saved in ~/Library/Preferences/AM2RLauncher
4543 /// <summary>
4644 /// Path to the Config file folder on *nix based systems. <br/>
4745 /// Linux: Will point to XDG_CONFIG_HOME/AM2RLauncher <br/>
@@ -51,6 +49,11 @@ public class CrossPlatformOperations
5149 : LINUXXDGCONFIG ) + "/AM2RLauncher" )
5250 : NIXHOME + "/Library/Preferences/AM2RLauncher" ;
5351
52+ /// <summary>
53+ /// Config file path for *nix based systems. Will be <see cref="NIXLAUNCHERCONFIGPATH"/> + "/config.xml".
54+ /// </summary>
55+ public static readonly string NIXLAUNCHERCONFIGFILEPATH = NIXLAUNCHERCONFIGPATH + "/config.xml" ;
56+
5457 /// <summary>
5558 /// Current Path where the Launcher is located. For more info, check <see cref="GenerateCurrentPath"/>.
5659 /// </summary>
@@ -112,7 +115,7 @@ public static string ReadFromConfig(string property)
112115 else if ( currentPlatform . IsGtk || currentPlatform . IsMac )
113116 {
114117 string launcherConfigPath = NIXLAUNCHERCONFIGPATH ;
115- string launcherConfigFilePath = launcherConfigPath + "/. config.xml" ;
118+ string launcherConfigFilePath = launcherConfigPath + "/config.xml" ;
116119 XML . LauncherConfigXML launcherConfig = new XML . LauncherConfigXML ( ) ;
117120
118121 // If folder doesn't exist, create it and the config file
@@ -160,7 +163,7 @@ public static void WriteToConfig(string property, object value)
160163 else if ( currentPlatform . IsGtk || currentPlatform . IsMac )
161164 {
162165 string launcherConfigPath = NIXLAUNCHERCONFIGPATH ;
163- string launcherConfigFilePath = launcherConfigPath + "/config.xml" ;
166+ string launcherConfigFilePath = NIXLAUNCHERCONFIGFILEPATH ;
164167 XML . LauncherConfigXML launcherConfig = new XML . LauncherConfigXML ( ) ;
165168
166169 // If folder doesn't exist, create it and the config file
@@ -208,7 +211,7 @@ public static void CopyOldConfigToNewConfig()
208211 else if ( currentPlatform . IsGtk || currentPlatform . IsMac )
209212 {
210213 string launcherConfigPath = NIXLAUNCHERCONFIGPATH ;
211- string launcherConfigFilePath = launcherConfigPath + "/config.xml" ;
214+ string launcherConfigFilePath = NIXLAUNCHERCONFIGFILEPATH ;
212215 XML . LauncherConfigXML launcherConfig = new XML . LauncherConfigXML ( ) ;
213216
214217 // For some reason deserializing and saving back again works, not exactly sure why, but I'll take it
0 commit comments