diff options
author | wm4 <wm4@nowhere> | 2020-01-19 19:26:51 +0100 |
---|---|---|
committer | wm4 <wm4@nowhere> | 2020-01-19 19:26:51 +0100 |
commit | 90c11fa72986bbed58300056ac9b30f691499292 (patch) | |
tree | f1e1fed43751b214cff0de7eb89f2e9bb7c44958 /stream/stream_libarchive.c | |
parent | 00cdda2ae80f2f3c5b6fc4302d7edaf14755d037 (diff) | |
download | mpv-90c11fa72986bbed58300056ac9b30f691499292.tar.bz2 mpv-90c11fa72986bbed58300056ac9b30f691499292.tar.xz |
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.
Diffstat (limited to 'stream/stream_libarchive.c')
-rw-r--r-- | stream/stream_libarchive.c | 6 |
1 files 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, |