Author: lasgouttes
Date: Tue May 31 12:37:09 2011
New Revision: 38895
URL: http://www.lyx.org/trac/changeset/38895
Log:
Fix bug #7551: Inclusion "." in filename creates LaTeX error sweave graphic
generation
This is different from the fix proposed in bug #7555, because we have to catter
for dots in temp dir path.
Modified:
lyx-devel/trunk/lib/scripts/lyxsweave.R
Modified: lyx-devel/trunk/lib/scripts/lyxsweave.R
==============================================================================
--- lyx-devel/trunk/lib/scripts/lyxsweave.R Tue May 31 03:12:27 2011
(r38894)
+++ lyx-devel/trunk/lib/scripts/lyxsweave.R Tue May 31 12:37:09 2011
(r38895)
@@ -30,7 +30,7 @@
setwd(ls.args[4])
# this is passed as a prefix.string to tell where temporary files should go
-ls.pr <- sub("\\.tex$", "", ls.args[2])
+ls.pr <- gsub('\\.([^/]*)$', '-\\1', sub("\\.tex$", "", ls.args[2]))
# Replace the default pdf device by the null device (tip from Yihui Xie)
# See:
http://yihui.name/en/2010/12/a-special-graphics-device-in-r-the-null-device/