]> git.lyx.org Git - lyx.git/blobdiff - src/buffer.C
Introduce and use latex_path().
[lyx.git] / src / buffer.C
index f33c70bbf6dcb629e2bf0dc2b853095f42864342..8f698f51968a1f0af0b3528673a125b46aac5fee 100644 (file)
@@ -98,6 +98,7 @@ using lyx::support::destroyDir;
 using lyx::support::getFormatFromContents;
 using lyx::support::IsDirWriteable;
 using lyx::support::LibFileSearch;
+using lyx::support::latex_path;
 using lyx::support::ltrim;
 using lyx::support::MakeAbsPath;
 using lyx::support::MakeDisplayPath;
@@ -870,10 +871,7 @@ void Buffer::makeLaTeXFile(ostream & os,
                        texrow().newline();
                }
                if (!original_path.empty()) {
-                       string inputpath = os::external_path(original_path);
-                       subst(inputpath, "~", "\\string~");
-                       if (inputpath.find(' ') != string::npos)
-                               inputpath = '"' + inputpath + '"';
+                       string const inputpath = latex_path(original_path);
                        os << "\\makeatletter\n"
                            << "\\def\\input@path{{"
                            << inputpath << "/}}\n"