diff options
author | Sergey M․ <dstftw@gmail.com> | 2015-11-05 04:37:51 +0600 |
---|---|---|
committer | Sergey M․ <dstftw@gmail.com> | 2015-11-05 04:39:21 +0600 |
commit | b3613d36da14ab527166326707c0f911d192144d (patch) | |
tree | c46371f83eef8d2562947a7afa19c752bed225ba /youtube_dl/YoutubeDL.py | |
parent | 53472df85793cc89deb779c2ffc3ae1f47292fd4 (diff) |
[YoutubeDL] Sanitize path after output template substitution (Closes #7367)
Diffstat (limited to 'youtube_dl/YoutubeDL.py')
-rwxr-xr-x | youtube_dl/YoutubeDL.py | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/youtube_dl/YoutubeDL.py b/youtube_dl/YoutubeDL.py index 12977bf80..1783ce01b 100755 --- a/youtube_dl/YoutubeDL.py +++ b/youtube_dl/YoutubeDL.py @@ -572,7 +572,7 @@ class YoutubeDL(object): if v is not None) template_dict = collections.defaultdict(lambda: 'NA', template_dict) - outtmpl = sanitize_path(self.params.get('outtmpl', DEFAULT_OUTTMPL)) + outtmpl = self.params.get('outtmpl', DEFAULT_OUTTMPL) tmpl = compat_expanduser(outtmpl) filename = tmpl % template_dict # Temporary fix for #4787 @@ -580,7 +580,7 @@ class YoutubeDL(object): # to workaround encoding issues with subprocess on python2 @ Windows if sys.version_info < (3, 0) and sys.platform == 'win32': filename = encodeFilename(filename, True).decode(preferredencoding()) - return filename + return sanitize_path(filename) except ValueError as err: self.report_error('Error in output template: ' + str(err) + ' (encoding: ' + repr(preferredencoding()) + ')') return None |