mirror of
https://github.com/libretro/RetroArch
synced 2025-02-21 09:39:56 +00:00
Cleanups in file_path_special.c
This commit is contained in:
parent
9347010599
commit
4de438e8ed
@ -91,16 +91,18 @@ void fill_pathname_expand_special(char *out_path,
|
|||||||
#endif
|
#endif
|
||||||
)
|
)
|
||||||
{
|
{
|
||||||
|
size_t src_size;
|
||||||
char application_dir[PATH_MAX_LENGTH];
|
char application_dir[PATH_MAX_LENGTH];
|
||||||
|
|
||||||
fill_pathname_application_path(application_dir, sizeof(application_dir));
|
fill_pathname_application_path(application_dir, sizeof(application_dir));
|
||||||
path_basedir(application_dir);
|
path_basedir(application_dir);
|
||||||
|
|
||||||
size_t src_size = strlcpy(out_path, application_dir, size);
|
src_size = strlcpy(out_path, application_dir, size);
|
||||||
rarch_assert(src_size < size);
|
rarch_assert(src_size < size);
|
||||||
|
|
||||||
out_path += src_size;
|
out_path += src_size;
|
||||||
size -= src_size;
|
size -= src_size;
|
||||||
in_path += 2;
|
in_path += 2;
|
||||||
}
|
}
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
@ -113,9 +115,9 @@ void fill_pathname_abbreviate_special(char *out_path,
|
|||||||
{
|
{
|
||||||
#if !defined(RARCH_CONSOLE)
|
#if !defined(RARCH_CONSOLE)
|
||||||
unsigned i;
|
unsigned i;
|
||||||
|
|
||||||
const char *home = getenv("HOME");
|
|
||||||
char application_dir[PATH_MAX_LENGTH];
|
char application_dir[PATH_MAX_LENGTH];
|
||||||
|
const char *home = getenv("HOME");
|
||||||
|
|
||||||
fill_pathname_application_path(application_dir, sizeof(application_dir));
|
fill_pathname_application_path(application_dir, sizeof(application_dir));
|
||||||
path_basedir(application_dir);
|
path_basedir(application_dir);
|
||||||
|
|
||||||
@ -158,6 +160,7 @@ void fill_pathname_application_path(char *buf, size_t size)
|
|||||||
{
|
{
|
||||||
size_t i;
|
size_t i;
|
||||||
(void)i;
|
(void)i;
|
||||||
|
|
||||||
if (!size)
|
if (!size)
|
||||||
return;
|
return;
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user