I can't get Sigil to crash when adding an existing file to Sigil that is marked as read-only (but otherwise, my user has full-control of the folder where the read-only file resides). But strangely enough, Sigil DOES crash when trying to save an epub to which a read-only file was added (Add Existing). But it doesn't matter if the epub is trying to be saved back to that same folder or not. It will crash wherever it's saved.
I can confirm that the added read-only file is also read-only in Sigil's scratch directory after it's added.
My guess would be a flush to disk call before saving the epub is failing because of that read-only status. Sigil just flat-out crashes when saving any epub (anywhere) that has a read-only file in Sigil's scratch area.
The new empty epub never actually gets saved, so I doubt the crash is the result of trying to clean up the tmp dir afterward.
|