mirror of
git://github.com/kovidgoyal/calibre.git
synced 2025-12-06 18:04:45 +01: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
1 changed files with 1 additions and 1 deletions
|
|
@ -1549,7 +1549,7 @@ def paste_files_from_clipboard(self):
|
||||||
container = current_container()
|
container = current_container()
|
||||||
for name, (path, mt) in iteritems(name_map):
|
for name, (path, mt) in iteritems(name_map):
|
||||||
with lopen(path, 'rb') as f:
|
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()
|
self.apply_container_update_to_gui()
|
||||||
|
|
||||||
def export_file(self, name, path):
|
def export_file(self, name, path):
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue