From 90c11fa72986bbed58300056ac9b30f691499292 Mon Sep 17 00:00:00 2001 From: wm4 Date: Sun, 19 Jan 2020 19:26:51 +0100 Subject: stream_libarchive: do not require leading / in archive URLs The / was added some time ago, because it simplifies some other things. But there is actually no reason to reject old URLs. --- stream/stream_libarchive.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/stream/stream_libarchive.c b/stream/stream_libarchive.c index c11ec706fb..eca5c73153 100644 --- a/stream/stream_libarchive.c +++ b/stream/stream_libarchive.c @@ -538,9 +538,9 @@ static int archive_entry_open(stream_t *stream) char *base = talloc_strdup(p, stream->path); char *name = strchr(base, '|'); *name++ = '\0'; - if (name[0] != '/') - return STREAM_ERROR; - p->entry_name = name + 1; + if (name[0] == '/') + name += 1; + p->entry_name = name; mp_url_unescape_inplace(base); p->src = stream_create(base, STREAM_READ | stream->stream_origin, -- cgit v1.2.3