mirror of
https://github.com/libretro/RetroArch.git
synced 2025-04-02 10:51:52 -04:00
fix path_relative_to
This commit is contained in:
parent
5f87fa1aca
commit
db723df879
1 changed files with 1 additions and 8 deletions
|
@ -913,15 +913,8 @@ size_t path_relative_to(char *out,
|
|||
/* Each segment of base turns into ".." */
|
||||
out[0] = '\0';
|
||||
for (i = 0; trimmed_base[i]; i++)
|
||||
{
|
||||
if (trimmed_base[i] == path_default_slash_c())
|
||||
{
|
||||
out[written++] = '.';
|
||||
out[written++] = '.';
|
||||
out[written++] = path_default_slash_c();
|
||||
out[written++] = '\0';
|
||||
}
|
||||
}
|
||||
STRLCAT_CONST_INCR(out, written, ".." path_default_slash(), size);
|
||||
|
||||
return strlcat(out, trimmed_path, size);
|
||||
}
|
||||
|
|
Loading…
Add table
Reference in a new issue