From 9b6d8ebc05b11c2ec9c6136322435556e56bfdab Mon Sep 17 00:00:00 2001 From: Georg Baum Date: Fri, 16 Mar 2007 10:21:15 +0000 Subject: [PATCH] * src/LaTeX.C (handleFoundFile): Don't embed a 0 character in a string (handleFoundFile): Don't call fs::exists without an fs::native check git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@17452 a592a061-630c-0410-9148-cb99ea01b6c8 --- src/LaTeX.C | 9 ++++----- 1 file changed, 4 insertions(+), 5 deletions(-) diff --git a/src/LaTeX.C b/src/LaTeX.C index 4585b1a718..9eb2176196 100644 --- a/src/LaTeX.C +++ b/src/LaTeX.C @@ -833,13 +833,12 @@ bool handleFoundFile(string const & ff, DepTable & head) if (exists) // everything o.k. break; - else { + else if (contains(foundfile, '"')) { // files with spaces are often enclosed in quotation - // marks; those have to be removed - string unquoted = subst(foundfile, '"', char()); + // marks; remove those and try again + string unquoted = subst(foundfile, "\"", ""); absname = makeAbsPath(unquoted); - if (fs::exists(absname.toFilesystemEncoding())) - break; + } else { // strip off part after last space and try again string strippedfile; string const stripoff = -- 2.39.2