]> git.lyx.org Git - features.git/commitdiff
* src/LaTeX.C (handleFoundFile):
authorJürgen Spitzmüller <spitz@lyx.org>
Fri, 16 Mar 2007 09:13:42 +0000 (09:13 +0000)
committerJürgen Spitzmüller <spitz@lyx.org>
Fri, 16 Mar 2007 09:13:42 +0000 (09:13 +0000)
- 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

src/LaTeX.C

index 2b0dd828e6f990cedbf5794634cbc01f754b525a..4585b1a7188887ae65ff2e311a97927a2b7840ed 100644 (file)
@@ -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 =