mirror of
https://github.com/mpv-player/mpv.git
synced 2025-12-28 05:33:14 +00:00
path: start special espansion with ~~name instead of ~name
Since commit 7381db60, strings like "~desktop/" were expanded as
platform-specific paths by mpv. Apparently this similarity to standard
Unix shell expansion caused confusion, so change it to "~~desktop/". The
shell doesn't expand this, so it should be better.
This commit is contained in:
@@ -182,7 +182,7 @@ char *mp_get_user_path(void *talloc_ctx, struct mpv_global *global,
|
||||
res = mp_find_config_file(talloc_ctx, global, rest0);
|
||||
} else if (bstr_equals0(prefix, "")) {
|
||||
res = mp_path_join(talloc_ctx, bstr0(getenv("HOME")), rest);
|
||||
} else {
|
||||
} else if (bstr_eatstart0(&prefix, "~")) {
|
||||
char type[80];
|
||||
snprintf(type, sizeof(type), "%.*s", BSTR_P(prefix));
|
||||
const char *p = mp_get_platform_path(talloc_ctx, type);
|
||||
|
||||
Reference in New Issue
Block a user