Fix compat with older versions of python

path.join doesn't handle PosixPath instances in older versions of python
which causes breakage.

fixes #71
This commit is contained in:
Ivan Habunek 2021-07-31 11:41:10 +02:00
parent 5c3cebd0f3
commit e3f66bda43
No known key found for this signature in database
GPG Key ID: CDBD63C43A30BB95

View File

@ -124,7 +124,7 @@ def _crete_temp_dir(base_uri):
path = urlparse(base_uri).path.lstrip("/") path = urlparse(base_uri).path.lstrip("/")
temp_dir = Path(tempfile.gettempdir(), "twitch-dl", path) temp_dir = Path(tempfile.gettempdir(), "twitch-dl", path)
temp_dir.mkdir(parents=True, exist_ok=True) temp_dir.mkdir(parents=True, exist_ok=True)
return temp_dir return str(temp_dir)
def download(args): def download(args):