View Single Post
Old 09-28-2017, 11:07 AM   #20
KevinH
Sigil Developer
KevinH ought to be getting tired of karma fortunes by now.KevinH ought to be getting tired of karma fortunes by now.KevinH ought to be getting tired of karma fortunes by now.KevinH ought to be getting tired of karma fortunes by now.KevinH ought to be getting tired of karma fortunes by now.KevinH ought to be getting tired of karma fortunes by now.KevinH ought to be getting tired of karma fortunes by now.KevinH ought to be getting tired of karma fortunes by now.KevinH ought to be getting tired of karma fortunes by now.KevinH ought to be getting tired of karma fortunes by now.KevinH ought to be getting tired of karma fortunes by now.
 
Posts: 8,884
Karma: 6120478
Join Date: Nov 2009
Device: many
I like this idea as it is much safer in general. When I get a free moment, I will see if it is an easy modification.

Quote:
Originally Posted by DiapDealer View Post
That would probably be easy enough.

I've never really delved very deeply into the OpenWith code, so I have no idea what would be involved, but it doesn't seem to me that it would be impossible to employ an approach that:

1) copied the file in question to a new temp folder and opened that file in the external editor
2) after the editing is complete, copy ONLY the original filename back to the epub's scratch directory.

Checks could of course be made to determine whether the file was changed or not, and if the original file name is no longer present in the staging temp location (like with an unwise rename), a warning could be popped that nothing is being changed.

Just spit-balling, really. I just don't want to introduce anything into the Open With code that would require any kind of parsing/modification of the EPUB's manifest. File out ... same file name back in.
KevinH is offline   Reply With Quote