Add a warning about renaming a library causing calibre:// URLs pointing to it to stop working

This commit is contained in:
Kovid Goyal 2023-07-18 09:28:57 +05:30
parent 1dda886dc4
commit c0a5cb4270
No known key found for this signature in database
GPG Key ID: 06BC317B515ACE7C

View File

@ -560,7 +560,8 @@ class ChooseLibraryAction(InterfaceAction):
newname, ok = QInputDialog.getText(self.gui, _('Rename') + ' ' + old_name, newname, ok = QInputDialog.getText(self.gui, _('Rename') + ' ' + old_name,
'<p>'+_( '<p>'+_(
'Choose a new name for the library <b>%s</b>. ')%name + '<p>'+_( 'Choose a new name for the library <b>%s</b>. ')%name + '<p>'+_(
'Note that the actual library folder will be renamed.'), 'Note that the actual library folder will be renamed.') + '<p>' + _(
'WARNING: This means that any calibre:// URLs that point to things in this library will stop working.'),
text=old_name) text=old_name)
newname = sanitize_file_name(str(newname)) newname = sanitize_file_name(str(newname))
if not ok or not newname or newname == old_name: if not ok or not newname or newname == old_name: