@lomkiri: the log you provided shows that the key to the name_path_map dict on Linux is the full path. On windows, the key is the relative name.
On windows:
Code:
root: C:\Users\Charles\AppData\Local\Temp\calibre_b79oq7bw\4vvfit2c_modify-epub
[...]
dirpath: C:\Users\Charles\AppData\Local\Temp\calibre_b79oq7bw\4vvfit2c_modify-epub\Ops
filename: 1.html
path:C:\Users\Charles\AppData\Local\Temp\calibre_b79oq7bw\4vvfit2c_modify-epub\Ops\1.html
name: Ops/1.html
This implies that os.path.relpath() (around line 103) is producing different answers depending on the system. On windows it is the relative path. On linux it is the full path.
I wonder why the code is written using relpath(). The root path should always be a prefix of the file path. I will try that. If it works on windows then I will post another test version.
EDIT: See later post. I am reasonably sure the path was changed somewhere else just before the ncx was checked.