From 462990210c2577315ec2e3ad9692669cf51d24f3 Mon Sep 17 00:00:00 2001 From: Kovid Goyal Date: Fri, 20 Apr 2012 01:18:24 +0530 Subject: [PATCH] ... --- src/calibre/gui2/actions/choose_library.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/calibre/gui2/actions/choose_library.py b/src/calibre/gui2/actions/choose_library.py index 4990178a4b..00b8b176c3 100644 --- a/src/calibre/gui2/actions/choose_library.py +++ b/src/calibre/gui2/actions/choose_library.py @@ -12,7 +12,7 @@ from PyQt4.Qt import (QMenu, Qt, QInputDialog, QToolButton, QDialog, QDialogButtonBox, QGridLayout, QLabel, QLineEdit, QIcon, QSize, QCoreApplication) -from calibre import isbytestring +from calibre import isbytestring, sanitize_file_name_unicode from calibre.constants import filesystem_encoding, iswindows from calibre.utils.config import prefs from calibre.gui2 import (gprefs, warning_dialog, Dispatcher, error_dialog, @@ -275,7 +275,7 @@ class ChooseLibraryAction(InterfaceAction): '

'+_('Choose a new name for the library %s. ')%name + '

'+_('Note that the actual library folder will be renamed.'), text=name) - newname = unicode(newname) + newname = sanitize_file_name_unicode(unicode(newname)) if not ok or not newname or newname == name: return newloc = os.path.join(base, newname)