mirror of
https://github.com/libretro/RetroArch
synced 2025-03-29 22:20:21 +00:00
Merge pull request #2141 from frangarcj/master
(Vita) Fix directory creation
This commit is contained in:
commit
507c683398
@ -110,9 +110,9 @@ static void frontend_psp_get_environment_settings(int *argc, char *argv[],
|
||||
"playlists", sizeof(g_defaults.dir.playlist));
|
||||
fill_pathname_join(g_defaults.path.config, g_defaults.dir.port,
|
||||
"retroarch.cfg", sizeof(g_defaults.path.config));
|
||||
fill_pathname_join(g_defaults.dir.cheats, g_defaults.dir.cheats,
|
||||
fill_pathname_join(g_defaults.dir.cheats, g_defaults.dir.port,
|
||||
"cheats", sizeof(g_defaults.dir.cheats));
|
||||
fill_pathname_join(g_defaults.dir.remap, g_defaults.dir.remap,
|
||||
fill_pathname_join(g_defaults.dir.remap, g_defaults.dir.port,
|
||||
"remaps", sizeof(g_defaults.dir.remap));
|
||||
|
||||
#ifdef VITA
|
||||
|
@ -41,6 +41,7 @@
|
||||
#include <windows.h>
|
||||
#endif
|
||||
#elif defined(VITA)
|
||||
#define SCE_ERROR_ERRNO_EEXIST 0x80010011
|
||||
#include <psp2/io/fcntl.h>
|
||||
#include <psp2/io/dirent.h>
|
||||
#include <psp2/io/stat.h>
|
||||
@ -566,8 +567,13 @@ static bool path_mkdir_norecurse(const char *dir)
|
||||
ret = mkdir(dir, 0750);
|
||||
#endif
|
||||
/* Don't treat this as an error. */
|
||||
#if defined(VITA)
|
||||
if ((ret == SCE_ERROR_ERRNO_EEXIST) && path_is_directory(dir))
|
||||
ret = 0;
|
||||
#else
|
||||
if (ret < 0 && errno == EEXIST && path_is_directory(dir))
|
||||
ret = 0;
|
||||
#endif
|
||||
if (ret < 0)
|
||||
printf("mkdir(%s) error: %s.\n", dir, strerror(errno));
|
||||
return ret == 0;
|
||||
|
Loading…
x
Reference in New Issue
Block a user