Enrico Forestieri <[EMAIL PROTECTED]> writes: > > The attached patch fixes the bug reported here: > http://thread.gmane.org/gmane.editors.lyx.general/29227 > > In my intention this is the first of a series of patches aimed at polishing > the Cygwin target, which I think is lagging behind. Please, tell me if this > ok with you. I have no problem in maintaining the Cygwin target but my time > is limited so I cannot guarantee a continuous commitment. I will do it time > permitting. There should be no big problems, as I think the Cygwin users > will not be more than those I can count with only one of my hands > > Do you prefer that I file this one on bugzilla?
Here is a perhaps less obtrusive patch. -- Enrico Index: src/support/filetools.C =================================================================== --- src/support/filetools.C (revision 13450) +++ src/support/filetools.C (working copy) @@ -86,7 +86,16 @@ string const latex_path(string const & o latex_path_extension extension, latex_path_dots dots) { - string path = subst(original_path, "\\", "/"); + string path; + + if (suffixIs(original_path, '/')) { + // The call to os::external_path is needed for Cygwin. + path = subst(os::external_path(original_path), "\\", "/"); + if (!suffixIs(path, '/')) + path += "/"; + } else + path = subst(original_path, "\\", "/"); + path = subst(path, "~", "\\string~"); if (path.find(' ') != string::npos) { // We can't use '"' because " is sometimes active (e.g. if