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.
This commit is contained in:
wm4 2020-01-19 19:26:51 +01:00
parent 00cdda2ae8
commit 90c11fa729
1 changed files with 3 additions and 3 deletions

View File

@ -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,