Skip to content

Windows test failure #2589

Closed
jgm opened this Issue · 9 comments

2 participants

@jgm
Owner

screen shot 2015-12-13 at 5 11 51 pm

@jgm
Owner

Line 536 of the ICML writer uses pathSeparator - could it just as well use /?
Then the test output would not vary with OS.
The pathSeparator was added in 9deb335. I think it can be removed safely, or we can use Posix.pathSeparator as we do in Shared.

@jgm
Owner

@mb21 this was your code, according to the commit message. Any ideas?
According to this, one should never get something like file://./lalune.jpg, let alone file://.\lalune.jpg.
Do we need the file://? If so, should we get the absolute path to the file and insert that? Finally, can we use posix separators (/)?

@jgm
Owner

Interestingly, in the ICML spec they have examples like "file:D:/images/pumpkin.jpg"
without the //. Looks like forward slashes are fine.

@jgm jgm added a commit that closed this issue
@jgm Use posix path separators in ICML link URIs.
Closes #2589.
90b8024
@jgm jgm closed this in 90b8024
@mb21

It was "file:" ++ src before 9deb335, where I changed it to "file://." ++ pathSeparator : src and if I remember correctly, the reason was that relative paths didn't work before. This is not well documented, but seems to be the only way in IDML, even if it's not RFC 3986 conform.

btw, you can get a free trial of InDesign or InCopy...

@mb21

But maybe we should use file: for absolute paths and "file://./" ++ src for relative ones (it's possible that this would work for Windows as well, I don't have a Windows install handy..)

@mb21 mb21 referenced this issue
@jgm Fixed ICML image syntax for local files.
`file:filename` rather than `file://./filename`.

I think this is right; it matches what we had before
with people actually using the ICML writer, and seems
to match examples in the spec.  I don't
have a copy of InDesign I can test on, though.
@DigitalPublishingToolkit and @mb21, can you have
a look?
a924a3f
@mb21

Actually I just tried "file:foo.jpg" and "file:/Users/myuser/foo.jpg" on InCopy CS6 and InDesign CC 2015 on Mac OS X and both worked. So not quite sure what's changed, but you can disregard what I said before...

@jgm
Owner
@mb21

yes, at least on a Mac it works, but from the example you posted ("file:D:/images/pumpkin.jpg"), I'm fairly confident it works on Windows as well.

@jgm
Owner
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Something went wrong with that request. Please try again.