From 064b7a234ce9d4b6579b55918b54be9e35ae3265 Mon Sep 17 00:00:00 2001 From: Yann Leboulanger Date: Tue, 2 May 2006 06:36:49 +0000 Subject: [PATCH] correct list of not allowed chars under windows. Fixes #1913 --- src/common/helpers.py | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/src/common/helpers.py b/src/common/helpers.py index b7303043c..a3fd5f5a5 100644 --- a/src/common/helpers.py +++ b/src/common/helpers.py @@ -695,8 +695,9 @@ def sanitize_filename(filename): filename = punycode_encode(filename) # make it latin chars only filename = filename.replace('/', '_') if os.name == 'nt': - filename = filename.replace('?', '').replace(':', '').replace('!', '')\ - .replace('"', "'") + filename = filename.replace('?', '_').replace(':', '_')\ + .replace('\\', '_').replace('"', "'").replace('|', '_')\ + .replace('*', '_').replace('<', '_').replace('>', '_') # 48 is the limit if len(filename) > 48: extension = filename.split('.')[-1]