View Single Post
Old 02-17-2014, 09:58 PM   #4
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,450
Karma: 27757438
Join Date: Oct 2006
Location: Mumbai, India
Device: Various
calibre does not lock the file it is working on. I see no reason to do so, it reduces interoperability between programs and is a windows only feature (windows is the only platform that has mandatory file locks). In fact, the saving code in calibre is designed to be atomic without locking. So when you save, the original file is not written to, instead a new file is created and then renamed to the original. Since ebook formats dont support in place updating in any case, this approach makes the most sense.

If you do happen to move/delete the file externally, as you discovered you can always save a copy. And note that the failure only happens if you move/delete the *folder* in which the file is, not the file itself.

I could probably make that option prominent on the error dialog when a save error occurs.
kovidgoyal is offline   Reply With Quote