View Single Post
Old 10-20-2019, 03:33 AM   #3
DNSB
Bibliophagist
DNSB ought to be getting tired of karma fortunes by now.DNSB ought to be getting tired of karma fortunes by now.DNSB ought to be getting tired of karma fortunes by now.DNSB ought to be getting tired of karma fortunes by now.DNSB ought to be getting tired of karma fortunes by now.DNSB ought to be getting tired of karma fortunes by now.DNSB ought to be getting tired of karma fortunes by now.DNSB ought to be getting tired of karma fortunes by now.DNSB ought to be getting tired of karma fortunes by now.DNSB ought to be getting tired of karma fortunes by now.DNSB ought to be getting tired of karma fortunes by now.
 
DNSB's Avatar
 
Posts: 46,838
Karma: 169712582
Join Date: Jul 2010
Location: Vancouver
Device: Kobo Sage, Libra Colour, Lenovo M8 FHD, Paperwhite 4, Tolino epos
Quote:
Originally Posted by kovidgoyal View Post
I cant replicate, steps I tried:

Code:
calibre-debug -c "from calibre.utils.lock import windows_open as open; f = open('file.epub'); f.seek(1); input()"
this locks file.epub until you press enter

then tried refreshing file.epub in the viewer, it pops up an error about the file being locked, as expected.

I dont know is sigil uses atomic file writing, but if not it might be that the eub was in an inconsistent state, causing issues.
When I was testing, 2 in 6 times I got the failure so given the differences between software (this was on a Windows Insider preview) and hardware (running on a VMWare Workstation VM), not too surprising. As I said, in future, close the viewer and then re-open after editing is going to be my workflow.

I was originally expecting Sigil to not be able to save the file while it was open in viewer so was happy to save a couple of clicks/seconds.
DNSB is online now   Reply With Quote