mirror of
https://github.com/kovidgoyal/calibre.git
synced 2025-07-09 03:04:10 -04:00
Remove backup feature because it is dangerous
This commit is contained in:
parent
6fc3a25556
commit
6b116a88d0
@ -193,8 +193,7 @@ class MetadataBulkDialog(QDialog, Ui_MetadataBulkDialog):
|
|||||||
'Note: <b>you can destroy your library</b> '
|
'Note: <b>you can destroy your library</b> '
|
||||||
'using this feature. Changes are permanent. There '
|
'using this feature. Changes are permanent. There '
|
||||||
'is no undo function. You are strongly encouraged '
|
'is no undo function. You are strongly encouraged '
|
||||||
'to backup the metadata.db file in your library '
|
'to back up your library before proceeding.'))
|
||||||
'before proceeding.'))
|
|
||||||
self.s_r_error = None
|
self.s_r_error = None
|
||||||
self.s_r_obj = None
|
self.s_r_obj = None
|
||||||
|
|
||||||
@ -278,13 +277,6 @@ class MetadataBulkDialog(QDialog, Ui_MetadataBulkDialog):
|
|||||||
field = unicode(self.search_field.currentText())
|
field = unicode(self.search_field.currentText())
|
||||||
if not field or not self.s_r_obj:
|
if not field or not self.s_r_obj:
|
||||||
return
|
return
|
||||||
if self.s_r_backup_db.isChecked():
|
|
||||||
self.db.commit()
|
|
||||||
src = self.db.dbpath
|
|
||||||
dest = self.db.dbpath+'.backup'
|
|
||||||
if os.path.exists(dest):
|
|
||||||
os.remove(dest)
|
|
||||||
shutil.copyfile(src, dest)
|
|
||||||
|
|
||||||
fm = self.db.field_metadata[field]
|
fm = self.db.field_metadata[field]
|
||||||
|
|
||||||
|
@ -316,17 +316,14 @@ Future conversion of these books will use the default settings.</string>
|
|||||||
<bool>true</bool>
|
<bool>true</bool>
|
||||||
</property>
|
</property>
|
||||||
</widget>
|
</widget>
|
||||||
</item>
|
<item row="2" column="0">
|
||||||
<item row="2" column="0" colspan="3">
|
<widget class="QLabel" name="filler">
|
||||||
<widget class="QCheckBox" name="s_r_backup_db">
|
|
||||||
<property name="text">
|
<property name="text">
|
||||||
<string>Backup 'metadata.db' to 'metadata.db.backup' before applying changes</string>
|
<string> </string>
|
||||||
</property>
|
|
||||||
<property name="checked">
|
|
||||||
<bool>true</bool>
|
|
||||||
</property>
|
</property>
|
||||||
</widget>
|
</widget>
|
||||||
</item>
|
</item>
|
||||||
|
</item>
|
||||||
<item row="3" column="0">
|
<item row="3" column="0">
|
||||||
<widget class="QLabel" name="label_2">
|
<widget class="QLabel" name="label_2">
|
||||||
<property name="text">
|
<property name="text">
|
||||||
|
Loading…
x
Reference in New Issue
Block a user