]> git.lyx.org Git - features.git/commitdiff
Finish fixing bug #6623 (Sweave cannot read local files)
authorJean-Marc Lasgouttes <lasgouttes@lyx.org>
Thu, 27 Jan 2011 11:14:32 +0000 (11:14 +0000)
committerJean-Marc Lasgouttes <lasgouttes@lyx.org>
Thu, 27 Jan 2011 11:14:32 +0000 (11:14 +0000)
* in converters, make sure that $$p and $$r are slash-terminated paths (like in viwers, BTW)
* pass the full intput path to lyxsweave.R

git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@37337 a592a061-630c-0410-9148-cb99ea01b6c8

lib/configure.py
src/Converter.cpp

index 998f3a0b0ae611b3ede72192f51e290315206955..aecbfaf2b498bc09b109677bf804ed37ddf95b5f 100644 (file)
@@ -627,7 +627,7 @@ def checkConverterEntries():
         rc_entry = [r'''\converter literate   latex      "%%"  ""
 \converter literate   pdflatex      "%%"       ""'''])
     #
-    checkProg('a Sweave -> LaTeX converter', ['Rscript --no-save --no-restore $$s/scripts/lyxsweave.R $$i $$e $$r'],
+    checkProg('a Sweave -> LaTeX converter', ['Rscript --no-save --no-restore $$s/scripts/lyxsweave.R $$p$$i $$e $$r'],
         rc_entry = [r'''\converter sweave   latex      "%%"    ""
 \converter sweave   pdflatex      "%%" ""'''])
     #
index b96ef461e95404e6b1c24ae2e0bc1279783cc594..f208b7415f90fad9b8508c343596b6ac1d2d7a1a 100644 (file)
@@ -412,8 +412,8 @@ bool Converters::convert(Buffer const * buffer,
                        command = subst(command, token_from, quoteName(infile2));
                        command = subst(command, token_base, quoteName(from_base));
                        command = subst(command, token_to, quoteName(outfile2));
-                       command = subst(command, token_path, quoteName(infile.onlyPath().absFileName()));
-                       command = subst(command, token_orig_path, quoteName(orig_from.onlyPath().absFileName()));
+                       command = subst(command, token_path, quoteName(onlyPath(infile.absFileName())));
+                       command = subst(command, token_orig_path, quoteName(onlyPath(orig_from.absFileName())));
                        command = subst(command, token_encoding, buffer ? buffer->params().encoding().iconvName() : string());
                        command = libScriptSearch(command);