removed deriving Unix user data directory from program config file
authorHolger Schemel <info@artsoft.org>
Wed, 8 Feb 2023 11:54:28 +0000 (12:54 +0100)
committerHolger Schemel <info@artsoft.org>
Wed, 8 Feb 2023 11:54:28 +0000 (12:54 +0100)
src/main.c

index d6bc2d26db15beb6dbd0ea0832675c2292da95bc..7f3fc819fb370d40fe2f98239a46fbedc4482267 100644 (file)
@@ -7762,19 +7762,7 @@ static void InitProgramConfig(char *command_filename)
 
   // read default program config, if existing
   if (fileExists(config_filename))
-  {
-    // if program config file exists, derive Unix user data directory from it
-    // (but only if the program config file is not generic "setup.conf" file)
-    if (!strEqual(getBaseNamePtr(config_filename), SETUP_FILENAME))
-    {
-      userdata_basename = getBaseName(config_filename);
-
-      if (strSuffix(userdata_basename, ".conf"))
-       userdata_basename[strlen(userdata_basename) - 5] = '\0';
-    }
-
     LoadSetupFromFilename(config_filename);
-  }
 
   // set program title from potentially redefined program title
   if (setup.internal.program_title != NULL &&