From 46a1b0452813b6a790650ea96f4fb19e4815456a Mon Sep 17 00:00:00 2001 From: Kovid Goyal Date: Fri, 15 Jan 2010 10:03:31 -0700 Subject: [PATCH] ... --- src/calibre/__init__.py | 1 + 1 file changed, 1 insertion(+) diff --git a/src/calibre/__init__.py b/src/calibre/__init__.py index 347799de64..6faa021151 100644 --- a/src/calibre/__init__.py +++ b/src/calibre/__init__.py @@ -92,6 +92,7 @@ def sanitize_file_name(name, substitute='_', as_unicode=False): if as_unicode: one = one.decode(filesystem_encoding) one = one.replace('..', substitute) + # Windows doesn't like path components that end with a period if one.endswith('.'): one = one[:-1]+'_' return one