From: Jürgen Spitzmüller Date: Fri, 16 Mar 2007 09:13:42 +0000 (+0000) Subject: * src/LaTeX.C (handleFoundFile): X-Git-Tag: 1.6.10~10590 X-Git-Url: https://git.lyx.org/gitweb/?a=commitdiff_plain;h=fc26b56b4f608dd65ef6665df43566698a3e9a7b;p=features.git * src/LaTeX.C (handleFoundFile): - consider that paths with spaces might be enclosed in quotation marks (partial fix for bug 3172). git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@17451 a592a061-630c-0410-9148-cb99ea01b6c8 --- diff --git a/src/LaTeX.C b/src/LaTeX.C index 2b0dd828e6..4585b1a718 100644 --- a/src/LaTeX.C +++ b/src/LaTeX.C @@ -800,6 +800,12 @@ bool handleFoundFile(string const & ff, DepTable & head) // check for spaces string strippedfile = foundfile; while (contains(strippedfile, " ")) { + // files with spaces are often enclosed in quotation + // marks; those have to be removed + string unquoted = subst(strippedfile, '"', char()); + absname.set(unquoted); + if (insertIfExists(absname, head)) + return true; // strip off part after last space and try again string tmp = strippedfile; string const stripoff = @@ -828,6 +834,12 @@ bool handleFoundFile(string const & ff, DepTable & head) // everything o.k. break; else { + // files with spaces are often enclosed in quotation + // marks; those have to be removed + string unquoted = subst(foundfile, '"', char()); + absname = makeAbsPath(unquoted); + if (fs::exists(absname.toFilesystemEncoding())) + break; // strip off part after last space and try again string strippedfile; string const stripoff =