Skip to content

Commit acd3359

Browse files
committed
Resync
1 parent f980556 commit acd3359

2 files changed

Lines changed: 12 additions & 15 deletions

File tree

file/file_path.c

Lines changed: 11 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -597,21 +597,18 @@ size_t path_basedir(char *s)
597597
char *last_slash = NULL;
598598
if (!s || s[0] == '\0' || s[1] == '\0')
599599
return (s && s[0] != '\0') ? 1 : 0;
600-
slash = strrchr(s, '/');
601-
backslash = strrchr(s, '\\');
602-
last_slash = (!slash || (backslash > slash)) ? (char*)backslash : (char*)slash;
600+
slash = strrchr(s, '/');
601+
backslash = strrchr(s, '\\');
602+
last_slash = (!slash || (backslash > slash)) ? (char*)backslash : (char*)slash;
603603
if (last_slash)
604604
{
605-
last_slash[1] = '\0';
605+
last_slash[1] = '\0';
606606
return last_slash + 1 - s;
607607
}
608-
else
609-
{
610-
s[0] = '.';
611-
s[1] = PATH_DEFAULT_SLASH_C();
612-
s[2] = '\0';
613-
return 2;
614-
}
608+
s[0] = '.';
609+
s[1] = PATH_DEFAULT_SLASH_C();
610+
s[2] = '\0';
611+
return 2;
615612
}
616613

617614
/**
@@ -1446,13 +1443,13 @@ size_t fill_pathname_application_path(char *s, size_t len)
14461443
return 0;
14471444
}
14481445

1449-
void fill_pathname_application_dir(char *s, size_t len)
1446+
size_t fill_pathname_application_dir(char *s, size_t len)
14501447
{
14511448
#ifdef __WINRT__
1452-
strlcpy(s, uwp_dir_install, len);
1449+
return strlcpy(s, uwp_dir_install, len);
14531450
#else
14541451
fill_pathname_application_path(s, len);
1455-
path_basedir(s);
1452+
return path_basedir(s);
14561453
#endif
14571454
}
14581455

include/file/file_path.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -636,7 +636,7 @@ size_t fill_pathname_slash(char *path, size_t size);
636636

637637
#if !defined(RARCH_CONSOLE) && defined(RARCH_INTERNAL)
638638
size_t fill_pathname_application_path(char *buf, size_t size);
639-
void fill_pathname_application_dir(char *buf, size_t size);
639+
size_t fill_pathname_application_dir(char *buf, size_t size);
640640
size_t fill_pathname_home_dir(char *buf, size_t size);
641641
#endif
642642

0 commit comments

Comments
 (0)