mirror of
https://github.com/libretro/libretro-common.git
synced 2024-06-23 14:43:24 -04:00
Resync
This commit is contained in:
parent
8d23dd7d88
commit
bea5621fd7
|
@ -403,7 +403,7 @@ void fill_pathname_basedir(char *out_dir,
|
|||
{
|
||||
if (out_dir != in_path)
|
||||
strlcpy(out_dir, in_path, size);
|
||||
path_basedir_size(out_dir, size);
|
||||
path_basedir(out_dir);
|
||||
}
|
||||
|
||||
void fill_pathname_basedir_noext(char *out_dir,
|
||||
|
@ -554,32 +554,6 @@ void path_basedir(char *path)
|
|||
snprintf(path, 3, "." PATH_DEFAULT_SLASH());
|
||||
}
|
||||
|
||||
/**
|
||||
* path_basedir_size:
|
||||
* @path : path
|
||||
* @size : size of path
|
||||
*
|
||||
* Extracts base directory by mutating path.
|
||||
* Keeps trailing '/'.
|
||||
*
|
||||
* Specialized function that avoids the implicit
|
||||
* strlen call
|
||||
**/
|
||||
void path_basedir_size(char *path, size_t size)
|
||||
{
|
||||
char *last = NULL;
|
||||
|
||||
if (size < 2)
|
||||
return;
|
||||
|
||||
last = find_last_slash(path);
|
||||
|
||||
if (last)
|
||||
last[1] = '\0';
|
||||
else
|
||||
snprintf(path, 3, "." PATH_DEFAULT_SLASH());
|
||||
}
|
||||
|
||||
/**
|
||||
* path_parent_dir:
|
||||
* @path : path
|
||||
|
|
|
@ -37,6 +37,7 @@ extern nbio_intf_t nbio_orbis;
|
|||
#endif
|
||||
extern nbio_intf_t nbio_stdio;
|
||||
|
||||
#ifndef _XBOX
|
||||
#if defined(_WIN32)
|
||||
#if defined(_MSC_VER) && _MSC_VER >= 1500
|
||||
|
||||
|
@ -50,6 +51,7 @@ extern nbio_intf_t nbio_stdio;
|
|||
#define HAVE_MMAP_WIN32
|
||||
#endif
|
||||
#endif
|
||||
#endif
|
||||
|
||||
#endif
|
||||
|
||||
|
|
|
@ -497,7 +497,7 @@ bool m3u_file_save(
|
|||
if (find_last_slash(m3u_file->path))
|
||||
{
|
||||
strlcpy(base_dir, m3u_file->path, sizeof(base_dir));
|
||||
path_basedir_size(base_dir, STRLEN_CONST(base_dir));
|
||||
path_basedir(base_dir);
|
||||
}
|
||||
|
||||
/* Open file for writing */
|
||||
|
|
|
@ -135,19 +135,6 @@ const char *path_basename(const char *path);
|
|||
**/
|
||||
void path_basedir(char *path);
|
||||
|
||||
/**
|
||||
* path_basedir_size:
|
||||
* @path : path
|
||||
* @size : size of path
|
||||
*
|
||||
* Extracts base directory by mutating path.
|
||||
* Keeps trailing '/'.
|
||||
*
|
||||
* Specialized function that avoids the implicit
|
||||
* strlen call
|
||||
**/
|
||||
void path_basedir_size(char *path, size_t size);
|
||||
|
||||
/**
|
||||
* path_parent_dir:
|
||||
* @path : path
|
||||
|
|
Loading…
Reference in a new issue