mirror of
https://github.com/libretro/RetroArch
synced 2025-03-30 16:20:27 +00:00
(RARCH_CONSOLE) Replace rarch_make_dir with path_mkdir
This commit is contained in:
parent
1d60ea18c2
commit
452dd2cad8
@ -568,7 +568,6 @@ void path_resolve_realpath(char *buf, size_t size)
|
||||
|
||||
static bool path_mkdir_norecurse(const char *dir)
|
||||
{
|
||||
#if (defined(_WIN32) && !defined(_XBOX)) || !defined(RARCH_CONSOLE)
|
||||
#ifdef _WIN32
|
||||
int ret = _mkdir(dir);
|
||||
#else
|
||||
@ -579,10 +578,6 @@ static bool path_mkdir_norecurse(const char *dir)
|
||||
if (ret < 0)
|
||||
RARCH_ERR("mkdir(%s) error: %s.\n", dir, strerror(errno));
|
||||
return ret == 0;
|
||||
#else
|
||||
(void)dir;
|
||||
return false;
|
||||
#endif
|
||||
}
|
||||
|
||||
bool path_mkdir(const char *dir)
|
||||
|
@ -65,21 +65,6 @@ static bool libretro_install_core(const char *path_prefix,
|
||||
return true;
|
||||
}
|
||||
|
||||
void rarch_make_dir(const char *x, const char *name)
|
||||
{
|
||||
// FIXME: This should use path_mkdir() in file_path.c.
|
||||
RARCH_LOG("Checking directory name %s [%s]\n", name, x);
|
||||
if (strlen(x) > 0)
|
||||
{
|
||||
if (!path_is_directory(x))
|
||||
{
|
||||
RARCH_WARN("Directory \"%s\" does not exists, creating\n", x);
|
||||
if (mkdir((x), 0777) != 0)
|
||||
RARCH_ERR("Could not create directory \"%s\"\n", x);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
void rarch_get_environment_console(void)
|
||||
{
|
||||
init_libretro_sym(false);
|
||||
|
@ -57,7 +57,6 @@ const frontend_ctx_driver_t *frontend_ctx_find_driver(const char *ident); // Fin
|
||||
const frontend_ctx_driver_t *frontend_ctx_init_first(void); // Finds first suitable driver and initializes.
|
||||
|
||||
#ifdef RARCH_CONSOLE
|
||||
extern void rarch_make_dir(const char *x, const char *name);
|
||||
extern void rarch_get_environment_console(void);
|
||||
#endif
|
||||
|
||||
|
@ -273,10 +273,10 @@ static void get_environment_settings(int argc, char *argv[], void *args)
|
||||
#endif
|
||||
|
||||
#ifndef IS_SALAMANDER
|
||||
rarch_make_dir(default_paths.port_dir, "port_dir");
|
||||
rarch_make_dir(default_paths.system_dir, "system_dir");
|
||||
rarch_make_dir(default_paths.savestate_dir, "savestate_dir");
|
||||
rarch_make_dir(default_paths.sram_dir, "sram_dir");
|
||||
path_mkdir(default_paths.port_dir);
|
||||
path_mkdir(default_paths.system_dir);
|
||||
path_mkdir(default_paths.savestate_dir);
|
||||
path_mkdir(default_paths.sram_dir);
|
||||
|
||||
config_load();
|
||||
|
||||
|
@ -288,10 +288,10 @@ static void get_environment_settings(int argc, char *argv[], void *args)
|
||||
}
|
||||
|
||||
#ifndef IS_SALAMANDER
|
||||
rarch_make_dir(default_paths.port_dir, "port_dir");
|
||||
rarch_make_dir(default_paths.system_dir, "system_dir");
|
||||
rarch_make_dir(default_paths.savestate_dir, "savestate_dir");
|
||||
rarch_make_dir(default_paths.sram_dir, "sram_dir");
|
||||
path_mkdir(default_paths.port_dir);
|
||||
path_mkdir(default_paths.system_dir);
|
||||
path_mkdir(default_paths.savestate_dir);
|
||||
path_mkdir(default_paths.sram_dir);
|
||||
|
||||
config_load();
|
||||
|
||||
|
@ -71,10 +71,10 @@ static void get_environment_settings(int argc, char *argv[])
|
||||
snprintf(g_extern.config_path, sizeof(g_extern.config_path), "%s/retroarch.cfg", default_paths.port_dir);
|
||||
|
||||
#ifndef IS_SALAMANDER
|
||||
rarch_make_dir(default_paths.port_dir, "port_dir");
|
||||
rarch_make_dir(default_paths.system_dir, "system_dir");
|
||||
rarch_make_dir(default_paths.savestate_dir, "savestate_dir");
|
||||
rarch_make_dir(default_paths.sram_dir, "sram_dir");
|
||||
path_mkdir(default_paths.port_dir);
|
||||
path_mkdir(default_paths.system_dir);
|
||||
path_mkdir(default_paths.savestate_dir);
|
||||
path_mkdir(default_paths.sram_dir);
|
||||
|
||||
config_load();
|
||||
|
||||
|
@ -257,10 +257,10 @@ static void get_environment_settings(int argc, char *argv[], void *args)
|
||||
#endif
|
||||
|
||||
#ifndef IS_SALAMANDER
|
||||
rarch_make_dir(default_paths.port_dir, "port_dir");
|
||||
rarch_make_dir(default_paths.system_dir, "system_dir");
|
||||
rarch_make_dir(default_paths.savestate_dir, "savestate_dir");
|
||||
rarch_make_dir(default_paths.sram_dir, "sram_dir");
|
||||
path_mkdir(default_paths.port_dir);
|
||||
path_mkdir(default_paths.system_dir);
|
||||
path_mkdir(default_paths.savestate_dir);
|
||||
path_mkdir(default_paths.sram_dir);
|
||||
|
||||
config_load();
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user