View Single Post
Old 02-20-2013, 12:30 PM   #30
Turtle91
A Hairy Wizard
Turtle91 ought to be getting tired of karma fortunes by now.Turtle91 ought to be getting tired of karma fortunes by now.Turtle91 ought to be getting tired of karma fortunes by now.Turtle91 ought to be getting tired of karma fortunes by now.Turtle91 ought to be getting tired of karma fortunes by now.Turtle91 ought to be getting tired of karma fortunes by now.Turtle91 ought to be getting tired of karma fortunes by now.Turtle91 ought to be getting tired of karma fortunes by now.Turtle91 ought to be getting tired of karma fortunes by now.Turtle91 ought to be getting tired of karma fortunes by now.Turtle91 ought to be getting tired of karma fortunes by now.
 
Turtle91's Avatar
 
Posts: 1,516
Karma: 11627112
Join Date: Dec 2012
Location: Altus, Oklahoma today
Device: iPhone 6/5/iPad 1,2 & Air/Surface Pro/Kindle PW
It seems that the idea of a ".garbage" file type would still work. If sigil WON'T save invalid code with an .epub extension and it ONLY saves it as .garbage then there is no way you would get confused when saving. :edit: Just avoid the auto-cleanup if you use ctl-alt-s (or something) and save as a .garbage

The change that is required is on opening:
On opening, check to see if it is a valid epub BEFORE tidy/pretty can have a go at it.
- if it is an .epub file, show a warning box that it is invalid and give the user the OPTION to continue with cleanup or not
- if it is a .garbage file, then show the warning but no need for an option, just open without cleanup

I think that would allow people to save garbage if they absolutely had to, would prevent data loss when opening a badly formed .epub for the first time, and would let us keep the auto cleaning function enabled for normal workflow.

:edit: Doesn't Sigil already do something like this when adding external files?

Last edited by Turtle91; 02-20-2013 at 12:35 PM.
Turtle91 is offline   Reply With Quote