From 3dfbf94db3bbabd1079b50d15c29dd9cc94b0f26 Mon Sep 17 00:00:00 2001 From: Kovid Goyal Date: Wed, 11 Feb 2009 19:57:10 -0800 Subject: [PATCH] Fix #1820 (Error when saving to disk a book with 2 or more dots in the Title) --- src/calibre/__init__.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/calibre/__init__.py b/src/calibre/__init__.py index 360947de2a..3c61de4bec 100644 --- a/src/calibre/__init__.py +++ b/src/calibre/__init__.py @@ -69,7 +69,7 @@ def sanitize_file_name(name, substitute='_', as_unicode=False): one = re.sub(r'^\.+$', '_', one) if as_unicode: one = one.decode(filesystem_encoding) - return one + return one.replace('..', '_') class CommandLineError(Exception):