Update libretro-common

This commit is contained in:
libretroadmin
2023-02-20 21:52:22 +01:00
parent 729d42572e
commit 3aa20d86a4
19 changed files with 1541 additions and 945 deletions

File diff suppressed because it is too large Load Diff

View File

@@ -24,13 +24,11 @@
#include <stdlib.h>
#include <string.h>
#include <time.h>
#include <errno.h>
#include <sys/stat.h>
#include <boolean.h>
#include <file/file_path.h>
#include <retro_assert.h>
#include <compat/strl.h>
#include <compat/posix_string.h>
#include <retro_miscellaneous.h>
@@ -74,7 +72,7 @@ int path_stat(const char *path)
*
* Checks if path is a directory.
*
* Returns: true (1) if path is a directory, otherwise false (0).
* @return true if path is a directory, otherwise false.
*/
bool path_is_directory(const char *path)
{
@@ -105,8 +103,10 @@ int32_t path_get_size(const char *path)
* @dir : directory
*
* Create directory on filesystem.
*
* Recursive function.
*
* Returns: true (1) if directory could be created, otherwise false (0).
* @return true if directory could be created, otherwise false.
**/
bool path_mkdir(const char *dir)
{
@@ -118,12 +118,10 @@ bool path_mkdir(const char *dir)
/* Use heap. Real chance of stack
* overflow if we recurse too hard. */
basedir = strdup(dir);
if (!(basedir = strdup(dir)))
return false;
if (!basedir)
return false;
path_parent_dir(basedir);
path_parent_dir(basedir, strlen(basedir));
if (!*basedir || !strcmp(basedir, dir))
{