aboutsummaryrefslogtreecommitdiff
path: root/youtube_dl
diff options
context:
space:
mode:
authorPhilipp Hagemeister <phihag@phihag.de>2015-03-02 19:07:17 +0100
committerPhilipp Hagemeister <phihag@phihag.de>2015-03-02 19:07:19 +0100
commita7440261c52d6518a429210aaae598095112c61b (patch)
treec7dddd1b2358f987e3117d34de27fd72a7c5bfeb /youtube_dl
parent76c73715fb1e0eee61ace5ff7855d8237abdcd54 (diff)
[utils] Streap leading dots
Fixes #2865, closes #5087
Diffstat (limited to 'youtube_dl')
-rw-r--r--youtube_dl/utils.py1
1 files changed, 1 insertions, 0 deletions
diff --git a/youtube_dl/utils.py b/youtube_dl/utils.py
index d4938ec36..1d3401bc2 100644
--- a/youtube_dl/utils.py
+++ b/youtube_dl/utils.py
@@ -305,6 +305,7 @@ def sanitize_filename(s, restricted=False, is_id=False):
result = result[2:]
if result.startswith('-'):
result = '_' + result[len('-'):]
+ result = result.lstrip('.')
if not result:
result = '_'
return result