If you standardize to Sigil norm you will move image files (and almost all files) plus any links or urls to them so there is very little chance of files not changing. Moving a file or renaming a file is going to be equivalent to deleting the original and creating a new (copy) of the file in a new location or under a new name.
Remember, the same file name can exist in different folders in the same zip/epub so the modification date must tied to the full path to the file in the zip not just a filename.
Hope this explains what you reported.
The only alternative is to tie modification time to sha256 checksum instead of path to file in epub. If we do it that way, just moving or renaming a file would not impact its modification date in the new zip. I will give that a try to see if that is more useful.
As for hashes, we are sticking to QCryptographicHashes available back to Qt 5.10 or earlier to stay cross-platform. Again if it impacts load time significantly, we will make it a user preference setting.
Quote:
Originally Posted by democrite
I cannot thank you enough. That was the one thing I've wanted with certainty for so long, yet never thought of asking.
Just did one test. Seems ok on initial save. Then I tried restructure to Sigil Norm -- I think that's what did it --, all dates were changed. In such a case, I'd think images, mimetype, CSS, and maybe other should be unchanged if unmodified.
Concerning performance, for this purpose, maybe there are faster hashes? A quick look, there are many SO questions about such; and at least a few reports that the fastest seems to be xxHash, or possibly choose one of the faster ones that perhaps has more of a history (MurmurHash or SpookyHash?). Of links I found this may be helpful:
Non-crypto hashes in C++: Farm, City, xxHash, MUM, Spooky 2, Murmur, Metro and t1ha0
https://asecuritysite.com/encryption...e%20lazy%20dog
Of how much of speed difference there is on open and save, mine may not be a good indicator of relative performance compared to some average computer, but I think I can either thru the command-line or AppleScript run some tests and report back on time differences. I have some fairly large EPUBs, a few with thousands of images. That might be helpful.
|