Some more quoting of convertDefault.sh's args. Also committing now...
--
Angus
Index: src/insets/ChangeLog
===================================================================
RCS file: /usr/local/lyx/cvsroot/lyx-devel/src/insets/ChangeLog,v
retrieving revision 1.552.2.23
diff -u -p -r1.552.2.23 ChangeLog
--- src/insets/ChangeLog 7 Apr 2005 10:20:37 -0000 1.552.2.23
+++ src/insets/ChangeLog 17 Apr 2005 19:11:51 -0000
@@ -1,3 +1,8 @@
+2005-04-17 Angus Leeming <[EMAIL PROTECTED]>
+
+ * insetgraphics.C (prepareFile): protect all args of convertDefault.sh
+ script with quotes.
+
2005-03-31 Jean-Marc Lasgouttes <[EMAIL PROTECTED]>
* insetgraphics.C (latex): fix off-by-one error in number of
Index: src/insets/insetgraphics.C
===================================================================
RCS file: /usr/local/lyx/cvsroot/lyx-devel/src/insets/insetgraphics.C,v
retrieving revision 1.146.2.7
diff -u -p -r1.146.2.7 insetgraphics.C
--- src/insets/insetgraphics.C 7 Apr 2005 10:20:37 -0000 1.146.2.7
+++ src/insets/insetgraphics.C 17 Apr 2005 19:11:54 -0000
@@ -669,9 +669,12 @@ string const InsetGraphics::prepareFile(
// from ImageMagic: convert from:inname.from to:outname.to
if (!converters.convert(buf, temp_file, outfile_base, from, to)) {
string const command =
- "sh " + LibFileSearch("scripts", "convertDefault.sh") +
- ' ' + from + ':' + temp_file + ' ' +
- to + ':' + outfile_base + '.' + to;
+ "sh " +
+ QuoteName(LibFileSearch("scripts", "convertDefault.sh")) +
+ ' ' +
+ QuoteName(from + ':' + temp_file) +
+ ' ' +
+ QuoteName(to + ':' + outfile_base + '.' + to);
lyxerr[Debug::GRAPHICS]
<< "No converter defined! I use convertDefault.sh:\n\t"
<< command << endl;
Index: src/ChangeLog
===================================================================
RCS file: /usr/local/lyx/cvsroot/lyx-devel/src/ChangeLog,v
retrieving revision 1.2155
diff -u -p -Lsrc -r1.2155 ChangeLog
--- src
+++ src/ChangeLog 17 Apr 2005 19:23:38 -0000
@@ -1,3 +1,8 @@
+2005-04-17 Angus Leeming <[EMAIL PROTECTED]>
+
+ * converter.C (convert): protect all args of convertDefault.sh
+ script with quotes.
+
2005-04-11 Jean-Marc Lasgouttes <[EMAIL PROTECTED]>
* text3.C (dispatch): change the layout to "Caption" after inserting
Index: src/converter.C
===================================================================
RCS file: /usr/local/lyx/cvsroot/lyx-devel/src/converter.C,v
retrieving revision 1.104
diff -u -p -Lsrc -r1.104 converter.C
--- src
+++ src/converter.C 17 Apr 2005 19:23:39 -0000
@@ -295,10 +295,13 @@ bool Converters::convert(Buffer const *
// if no special converter defined, then we take the
// default one from ImageMagic.
string const from_ext = formats.extension(from_format);
- string const command = "sh " +
- LibFileSearch("scripts", "convertDefault.sh") +
- ' ' + from_ext + ':' + from_file +
- ' ' + to_ext + ':' + to_file;
+ string const command =
+ "sh " +
+ QuoteName(LibFileSearch("scripts", "convertDefault.sh")) +
+ ' ' +
+ QuoteName(from_ext + ':' + from_file) +
+ ' ' +
+ QuoteName(to_ext + ':' + to_file);
lyxerr[Debug::FILES]
<< "No converter defined! "
"I use convertDefault.sh:\n\t"