- if (last_separator != NULL)
- *last_separator = '\0'; /* separator found: strip basename */
- else
- basepath = "."; /* no separator found: use current path */
-
- return basepath;
-}
-
-static char *getProgramMainDataPath()
-{
- char *main_data_path = getStringCopy(program.command_basepath);
-
-#if defined(PLATFORM_MACOSX)
- static char *main_data_binary_subdir = NULL;
- static char *main_data_files_subdir = NULL;
-
- if (main_data_binary_subdir == NULL)
- {
- main_data_binary_subdir = checked_malloc(strlen(program.program_title) + 1 +
- strlen("app") + 1 +
- strlen(MAC_APP_BINARY_SUBDIR) + 1);
-
- sprintf(main_data_binary_subdir, "%s.app/%s",
- program.program_title, MAC_APP_BINARY_SUBDIR);
- }
-
- if (main_data_files_subdir == NULL)
+ /* if no separator was found, use current directory */
+ if (last_separator == NULL)