deleting multiple books error

Bug #1240797 reported by Eli Schwartz
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
calibre
Fix Released
Undecided
Unassigned

Bug Description

for some reason, whenever I run calibre later than 0.9.x and try to delete multiple books, I get a really weird error.
I'm now on calibre 1.6, running Ubuntu 12.04 LTS, and I still get the error.

It "refuses" to delete the dooks, but they are gone from the file explorer. A second delete gets rid of them. However, in the process, the parent folder of the library (Calibre Libraries) fills with such fascinating files as (using copied test library Testy):
Testy deleted 8vB8l3
Testy deleted DNnrAl
Testy deleted f8oDvZ
Testy deleted gGj7vz
Testy deleted GJZCjt
Testy deleted M7_Rbl
Testy deleted n66qWB
Testy deleted PC1uQh
Testy deleted rXjSzN
Testy deleted t1pFzB
Testy deleted WIdDdl
Testy deleted wOnkA1
Testy deleted zk9Z67

Error message is as follows:

Error: Failed to delete
Failed to delete some books, click the Show Details button for details.

details:
==> Rainbow Six
Traceback (most recent call last):
  File "site-packages/calibre/gui2/actions/delete.py", line 59, in delete_one
  File "site-packages/calibre/db/legacy.py", line 336, in delete_book
  File "site-packages/calibre/db/cache.py", line 56, in ans
  File "site-packages/calibre/db/cache.py", line 1391, in remove_books
  File "site-packages/calibre/db/backend.py", line 1476, in remove_books
  File "site-packages/calibre/db/delete_service.py", line 49, in delete_books
  File "site-packages/calibre/db/delete_service.py", line 64, in queue_paths
OSError: [Errno 1] Operation not permitted: '/home/schwartze/Calibre Libraries/Testy/Tom Clancy'

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

For some reason, your OS is raising permission denied (EPERM) errors
when calibre tries to delete a non-empty directory, instead of
ENOTEMPTY, which is causing the problem. Do you have your calibre
library on some kind of special filesystem?

  status incomplete

Changed in calibre:
status: New → Incomplete
Revision history for this message
Kovid Goyal (kovid) wrote :

In any case, I have changed the code to not rely on the OS sending the
proper error code, it will now manually check if the directory is empty.
That should fix your problem.

 status fixreleased

Changed in calibre:
status: Incomplete → Fix Released
Revision history for this message
Eli Schwartz (eschwartz) wrote :

ltsp on a school computer, I guess.

Thanks.

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.