View Single Post
Old 08-18-2019, 04:47 PM   #15
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,922
Karma: 6240958
Join Date: Nov 2009
Device: many
Yes but using a canonical file for the temp folder created another issue for macOS a ways back (and if our call to canonical is broken - that explains why.

So the best solution is not to resolve relative hrefs from the manifest using canonical but instead to do it the way I have just added to PageEdit (a utility routine) that will work for all platforms.

What we need is an absolute path without relative segments if canonical is broken on macOS and sometimes doesn't resolve all symlinks that start at root.

I guess we could start with a canonical name in TempFolder and if that breaks me (my macos 10.13 machine) we can try to just resolve relative links and not symlinks and let the symlinks live. The problem is hard links will then break the canonical file paths as will some aliases. Hmm....

Kevin




Quote:
Originally Posted by DiapDealer View Post
In this commit: https://github.com/Sigil-Ebook/Sigil...517017fbc659d5

Is m_ExtractedFolderPath canonical? And if not, shouldn't it be? If it's absolute, then you might be subtracting apples from oranges to get the relative path. Canonical should remove symbolic links.
KevinH is offline   Reply With Quote