mirror of
https://github.com/libretro/RetroArch
synced 2025-02-06 00:39:53 +00:00
Simplify is_path_accessible_using_standard_io
This commit is contained in:
parent
42a3d433dc
commit
74a3e5be8a
@ -1280,17 +1280,15 @@ void fill_pathname_home_dir(char *s, size_t len)
|
||||
|
||||
bool is_path_accessible_using_standard_io(const char *path)
|
||||
{
|
||||
bool result = true;
|
||||
#ifdef __WINRT__
|
||||
size_t path_sizeof = PATH_MAX_LENGTH * sizeof(char);
|
||||
char *relative_path_abbrev = (char*)malloc(path_sizeof);
|
||||
fill_pathname_abbreviate_special(relative_path_abbrev, path, path_sizeof);
|
||||
|
||||
result = (strlen(relative_path_abbrev) >= 2 )
|
||||
&& (relative_path_abbrev[0] == ':' || relative_path_abbrev[0] == '~')
|
||||
char relative_path_abbrev[PATH_MAX_LENGTH];
|
||||
fill_pathname_abbreviate_special(relative_path_abbrev,
|
||||
path, sizeof(relative_path_abbrev));
|
||||
return (strlen(relative_path_abbrev) >= 2 )
|
||||
&& ( relative_path_abbrev[0] == ':'
|
||||
|| relative_path_abbrev[0] == '~')
|
||||
&& PATH_CHAR_IS_SLASH(relative_path_abbrev[1]);
|
||||
|
||||
free(relative_path_abbrev);
|
||||
#else
|
||||
return true;
|
||||
#endif
|
||||
return result;
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user