View Single Post
Old 02-24-2014, 10:44 PM   #9
kovidgoyal
creator of calibre
kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.
 
kovidgoyal's Avatar
 
Posts: 45,382
Karma: 27756918
Join Date: Oct 2006
Location: Mumbai, India
Device: Various
Here is the code for deleting files in calibre, it happens in a separate process, because windows has no API for deleting to recycle bin that does not spin the event loop. And processing events while in the middle of a database update operation is a strict no-no if you want to maintain database integrity.

https://github.com/kovidgoyal/calibr...dows/recycle.c

I can see nothing there that could possibly cause an issue. I suspect that the windows SHFileOperation function is broken. It assumes it is called from within a GUI app with a window, and if it is called from a command line program, it fails to update the recycle bin icon, on some systems.

On my windows system, the recycle bin icon is updated as soon as a book is deleted.
kovidgoyal is offline   Reply With Quote