projects
/
youtube-dl
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
ab6ca04
)
[utils:sanitize_path] Disallow trailing whitespace in path segment (Closes #7332)
author
Sergey M․
<dstftw@gmail.com>
Sun, 1 Nov 2015 22:26:20 +0000
(
04:26
+0600)
committer
Sergey M․
<dstftw@gmail.com>
Sun, 1 Nov 2015 22:26:20 +0000
(
04:26
+0600)
youtube_dl/utils.py
patch
|
blob
|
history
diff --git
a/youtube_dl/utils.py
b/youtube_dl/utils.py
index efd5f4ae111448ca9933136b151ca1bf6a0505a8..7b3f79141fff9abb12b7ac2a532592d790a8171c 100644
(file)
--- a/
youtube_dl/utils.py
+++ b/
youtube_dl/utils.py
@@
-366,7
+366,7
@@
def sanitize_path(s):
if drive_or_unc:
norm_path.pop(0)
sanitized_path = [
- path_part if path_part in ['.', '..'] else re.sub('(?:[/<>:"\\|\\\\?\\*]|
\.
$)', '#', path_part)
+ path_part if path_part in ['.', '..'] else re.sub('(?:[/<>:"\\|\\\\?\\*]|
[\s.]
$)', '#', path_part)
for path_part in norm_path]
if drive_or_unc:
sanitized_path.insert(0, drive_or_unc + os.path.sep)