mirror of
https://github.com/kovidgoyal/calibre.git
synced 2025-07-08 02:34:06 -04:00
Edit book: Fix pasting files from another editor instance failing if a file with the same name already exists. Fixes #1959782 [Problems with drag and drop or adding files in the editor](https://bugs.launchpad.net/calibre/+bug/1959782)
This commit is contained in:
parent
ed209b9374
commit
fce128a10e
@ -1549,7 +1549,7 @@ class Boss(QObject):
|
||||
container = current_container()
|
||||
for name, (path, mt) in iteritems(name_map):
|
||||
with lopen(path, 'rb') as f:
|
||||
container.add_file(name, f.read(), media_type=mt)
|
||||
container.add_file(name, f.read(), media_type=mt, modify_name_if_needed=True)
|
||||
self.apply_container_update_to_gui()
|
||||
|
||||
def export_file(self, name, path):
|
||||
|
Loading…
x
Reference in New Issue
Block a user