View Single Post
Old 02-22-2011, 07:19 AM   #13
pdurrant
Santa Mouse
pdurrant ought to be getting tired of karma fortunes by now.pdurrant ought to be getting tired of karma fortunes by now.pdurrant ought to be getting tired of karma fortunes by now.pdurrant ought to be getting tired of karma fortunes by now.pdurrant ought to be getting tired of karma fortunes by now.pdurrant ought to be getting tired of karma fortunes by now.pdurrant ought to be getting tired of karma fortunes by now.pdurrant ought to be getting tired of karma fortunes by now.pdurrant ought to be getting tired of karma fortunes by now.pdurrant ought to be getting tired of karma fortunes by now.pdurrant ought to be getting tired of karma fortunes by now.
 
pdurrant's Avatar
 
Posts: 33,335
Karma: 90778786
Join Date: Jul 2007
Location: Norfolk, England
Device: NOOK ST GlowLight
Quote:
Originally Posted by Piquan View Post
Thanks for your investigation, and the tool!

After I got v1.1, I added, at line 78 (just after calculating penoffset and lastoffset), the following:
if datain[self.penoffset:self.penoffset+4] != 'SRCS':
raise StripException("already stripped")

The intention here is to not delete the FCIS segment from an already-stripped file (or one that was generated with -donotaddsource). I'm enough of a doofus that I'm sure to mess up something by stripping it twice! (On the other hand, I've found one source that says the FLIS and FCIS segments aren't necessary for the Kindle, so at least I'd get a few second chances.)

Thanks again!
What a good find. I hadn't realised that there were some constant bytes in that bit. I'll see if I can get an updated version done.
pdurrant is offline   Reply With Quote