mirror of
https://github.com/kovidgoyal/calibre.git
synced 2025-07-09 03:04:10 -04:00
Fix retiring a note with a resource throwing an error if a version of the note with the same resource is already retired
This commit is contained in:
parent
b9dcc6ee85
commit
07a77403a8
@ -172,6 +172,7 @@ class Notes:
|
||||
rpath = make_long_path_useable(self.path_for_resource(rhash))
|
||||
if os.path.exists(rpath):
|
||||
rdest = os.path.join(destdir, 'res-'+rname)
|
||||
with suppress(shutil.SameFileError):
|
||||
copyfile_using_links(rpath, make_long_path_useable(rdest), dest_is_dir=False)
|
||||
self.trim_retired_dir()
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user