Finish fixing bug #6623 (Sweave cannot read local files)

* 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
This commit is contained in:
Jean-Marc Lasgouttes 2011-01-27 11:14:32 +00:00
parent 917785df71
commit fe54f0c341
2 changed files with 3 additions and 3 deletions

View 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 "%%" ""'''])
#

View 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);