From fcf06ef5808dd32b3888eb4ecf7d9ae0ebc4d243 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Kjist=C3=B3f?= Date: Mon, 13 Feb 2017 15:50:11 +0100 Subject: [PATCH] Fix a bug where script would crash due to paths being normalised --- normalisename.py | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/normalisename.py b/normalisename.py index 1e8cbb9..b055aa2 100644 --- a/normalisename.py +++ b/normalisename.py @@ -20,9 +20,8 @@ for path in argv[1:]: joinpath ( dir, - ''.join(ch for ch in file + ''.join(ch for ch in file.replace(' ', '_') if ch.isalnum() or ch in whitelist) ) - ) - .replace(' ', '_')) + ))