Jean-Marc Lasgouttes <[EMAIL PROTECTED]> writes: > > >>>>> "Enrico" == Enrico Forestieri <[EMAIL PROTECTED]> writes: > > Enrico> Really? I had thought the second one was more cleaner. > Enrico> Actually I had to figure out that when latex_path() is called > Enrico> for generating the argument of \input <at> path it is assumed that > Enrico> a trailing / is present, and the second patch makes this clear > Enrico> not only for cygwin. > > Why shall we assume that? I do not really understand this explicit > check for a trailing slash. I think it should be elsewhere.
I saw that the [EMAIL PROTECTED] argument always has a double / appended. In my eyes this was not wrong because I remember that in kpathsea a double / signals to also search for subdirectories. Your post rang an alarm bell for me and I checked the [EMAIL PROTECTED] syntax and indeed it is not the same as for kpathsea. A single / should be appended to the path, but it seems that two do not hurt. Now, as a / was later added to the path, in my mind a / should have already been in the path. And indeed this is the case: whenever latex_path() is called to generate the argument of [EMAIL PROTECTED] the path which is passed always has a / appended. As I think that one should not fix what is not broken, in my patch I used that to distinguish when latex_path should generate the argument of [EMAIL PROTECTED] such that to act on this case only. Not only, as in cygwin external_path() can remove the trailing slash, I also paid attention to readd it... So I now know that the trailing slash is not there on purpose. However, it is a good flag for signaling latex_path() that a path for [EMAIL PROTECTED] is to be generated. Now I think I have two choices: 1) Find in the sources where latex_path() is called for [EMAIL PROTECTED], in order to enforce the trailing slash as a flag for this case, and then modify the patch such as to later remove it in latex_path(). 2) Check if the path passed to latex_path() is a directory. If it is, assume that this is the [EMAIL PROTECTED] case and act accordingly. What do you think is the better choice? -- Enrico