demux_libarchive: normalize stream URL path before escaping

Path normalization can introduce pipe characters from the current
working directory when opening relative paths, which will make the
stream split the path and entry name prematurely. Escape the normalized
path, not the other way around.

Fixes: 440f35a26d ("demux_libarchive: normalize the stream url path")
This commit is contained in:
Attila Fidan authored and sfan5 committed 2025-07-31 15:25:52 +02:00
1 parent 03cafa10a7
commit 21e7c36349
1 file changed
+1 -1
+1 -1
View File
@@ -76,7 +76,7 @@ static int open_file(struct demuxer *demuxer, enum demux_check check)
struct playlist *pl = talloc_zero(demuxer, struct playlist);
demuxer->playlist = pl;
char *prefix = mp_normalize_path(NULL, mp_url_escape(mpa, demuxer->stream->url, "~|%"));
char *prefix = mp_url_escape(NULL, mp_normalize_path(mpa, demuxer->stream->url), "~|%");
char **files = NULL;
int num_files = 0;