View Single Post
Old 05-01-2019, 09:42 PM   #1216
Rev. Bob
Wizard
Rev. Bob ought to be getting tired of karma fortunes by now.Rev. Bob ought to be getting tired of karma fortunes by now.Rev. Bob ought to be getting tired of karma fortunes by now.Rev. Bob ought to be getting tired of karma fortunes by now.Rev. Bob ought to be getting tired of karma fortunes by now.Rev. Bob ought to be getting tired of karma fortunes by now.Rev. Bob ought to be getting tired of karma fortunes by now.Rev. Bob ought to be getting tired of karma fortunes by now.Rev. Bob ought to be getting tired of karma fortunes by now.Rev. Bob ought to be getting tired of karma fortunes by now.Rev. Bob ought to be getting tired of karma fortunes by now.
 
Rev. Bob's Avatar
 
Posts: 1,760
Karma: 9918418
Join Date: Feb 2013
Location: Here on the perimeter, there are no stars
Device: Kobo H2O, iPad mini 3, Kindle Touch
Quote:
Originally Posted by JimmXinu View Post
And actually, no I didn't do a name collision check. In theory, it would be nice, but seriously, if your epub has chap01.htm and chap01.xhtml in the same dir in the same epub, you have bigger problems.
That’s a wonderful theory for primary content, but it can fail rather horribly when considering frontmatter, backmatter, and auto-generated content. (Example: An EPUB 3 toc.xhtml navigation document can happily coexist with a frontmatter toc.html table of contents. Similar content, different purposes, one visible to the user and one not, and overwriting one with the other will break the EPUB. This is not at all rare.) Plus, have you seen ebooks? Many of them do have big problems, and at the very least, our duty is to not make those worse.

A name collision check should be regarded as mission-critical, especially given the possibility of data loss and how trivial it is to fix. If a collision is found, just set up a counter and keep testing (name)_(counter).(extension) until you find an available name. Boom, done.

Last edited by Rev. Bob; 05-01-2019 at 09:46 PM.
Rev. Bob is offline   Reply With Quote