(PSP) Don't treat directory already existing as an error

This commit is contained in:
twinaphex 2015-09-24 15:17:50 +02:00
parent eab10e7929
commit a55d4a91ca

View File

@ -168,9 +168,12 @@ bool mkdir_norecurse(const char *dir)
ret = mkdir(dir, 0750);
#endif
/* Don't treat this as an error. */
#if defined(VITA) || defined(PSP)
#if defined(VITA)
if ((ret == SCE_ERROR_ERRNO_EEXIST) && path_is_directory(dir))
ret = 0;
#elif defined(PSP)
if ((ret == -1) && path_is_directory(dir))
ret = 0;
#else
if (ret < 0 && errno == EEXIST && path_is_directory(dir))
ret = 0;