ebook-edit fails to save after rename or merge of files

Bug #1796245 reported by Sigmund Augdal
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
calibre
Invalid
Undecided
Unassigned

Bug Description

Version: 3.32
OS: Windows 10

Steps to reproduce:
extract epub to folder
open ebook-edit
select File -> Open folder (unzipped EPUB) as book
select folder and press ok
right click on file in left hand file browser
select Rename filename.html
enter new filename
press Save

Dialog box pops up saying save failed with the following details:
---------------------
calibre, version 3.32.0
ERROR: Could not save: Saving of the book failed. Click "Show details" for more information. You can try to save a copy to a different location, via File->Save a copy

Traceback (most recent call last):
  File "site-packages\calibre\gui2\tweak_book\save.py", line 199, in process_save
  File "site-packages\calibre\gui2\tweak_book\save.py", line 211, in do_save
  File "site-packages\calibre\gui2\tweak_book\save.py", line 33, in save_container
  File "site-packages\calibre\gui2\tweak_book\save.py", line 28, in save_dir_container
  File "site-packages\calibre\ebooks\oeb\polish\container.py", line 1337, in commit
WindowsError: [Error 32] Prosessen f�r ikke tilgang til filen fordi den brukes av en annen prosess: u'.'
--------------------
Last message is in Norwegian and says permission denied because the file is in use by a different process.

Pressing Save again works. If you renamed several files it will fail once for each file. e.g renaming 10 files causes save to fail 10 times and work on the 11th time.

Merging files causes similar issues. If you merge 4 files into 1 save will fail 3 times and work on the 4th. This makes me think that rename is implemented by deleting the old file and saving a new file and in both save and rename cases file is deleted before it is closed and that this isn't allowed by windows

Revision history for this message
Kovid Goyal (kovid) wrote : Re: calibre bug 1796245

I cannot replicate with that set of steps on my windows machine. Note
that the editor operates on a copy of the original book folder. Every
operation is performed on the copy. When you click save the original
folder is updated from the copy. SSo there is no question of calibre
deleting still open files.

The only suggestion I have is that you exclude whatever folder you are
using for the books from your antivirus/file sync type programs as these
can often hold a file open.

 status invalid

Changed in calibre:
status: New → Invalid
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.