resmgr: unquote URL encoded path
@@ -5,7 +5,7 @@ import re
from shutil import copytree
from datetime import datetime
from tarfile import open as open_tarfile
-from urllib.parse import urlparse
+from urllib.parse import urlparse, unquote
import requests
from yaml import safe_load, safe_dump
@@ -166,7 +166,7 @@ class OcrdResourceManager():
destdir = Path(basedir, executable)
if not name:
url_parsed = urlparse(url)
- name = Path(url_parsed.path).name
+ name = Path(unqote(url_parsed.path)).name
fpath = Path(destdir, name)
if fpath.exists() and not overwrite:
log.info("%s to be downloaded to %s which already exists and overwrite is False" % (url, fpath))
