mirror of
https://github.com/mpv-player/mpv
synced 2025-03-11 08:37:59 +00:00
path: cosmetics
Avoiding conditional directives that split up parts of statements. Signed-off-by: wm4 <wm4@nowhere>
This commit is contained in:
parent
b325ed1105
commit
69cc002c92
@ -226,17 +226,19 @@ char *mp_splitext(const char *path, bstr *root)
|
||||
|
||||
char *mp_path_join_bstr(void *talloc_ctx, struct bstr p1, struct bstr p2)
|
||||
{
|
||||
bool test;
|
||||
if (p1.len == 0)
|
||||
return bstrdup0(talloc_ctx, p2);
|
||||
if (p2.len == 0)
|
||||
return bstrdup0(talloc_ctx, p1);
|
||||
|
||||
#if HAVE_DOS_PATHS
|
||||
if ((p2.len >= 2 && p2.start[1] == ':')
|
||||
|| p2.start[0] == '\\' || p2.start[0] == '/')
|
||||
test = (p2.len >= 2 && p2.start[1] == ':')
|
||||
|| p2.start[0] == '\\' || p2.start[0] == '/';
|
||||
#else
|
||||
if (p2.start[0] == '/')
|
||||
test = p2.start[0] == '/';
|
||||
#endif
|
||||
if (test)
|
||||
return bstrdup0(talloc_ctx, p2); // absolute path
|
||||
|
||||
bool have_separator;
|
||||
|
Loading…
Reference in New Issue
Block a user