From f04d591c96621ea35a3535fc577121678d1198ba Mon Sep 17 00:00:00 2001 From: Angus Leeming Date: Sun, 17 Apr 2005 19:31:27 +0000 Subject: [PATCH] Quote args passed to convertDefault.sh git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@9822 a592a061-630c-0410-9148-cb99ea01b6c8 --- src/ChangeLog | 5 +++++ src/converter.C | 11 +++++++---- 2 files changed, 12 insertions(+), 4 deletions(-) diff --git a/src/ChangeLog b/src/ChangeLog index bb11f79773..eab081db17 100644 --- a/src/ChangeLog +++ b/src/ChangeLog @@ -1,3 +1,8 @@ +2005-04-17 Angus Leeming + + * converter.C (convert): protect all args of convertDefault.sh + script with quotes. + 2005-04-11 Jean-Marc Lasgouttes * text3.C (dispatch): change the layout to "Caption" after inserting diff --git a/src/converter.C b/src/converter.C index 1784d915cd..79feb70ffe 100644 --- a/src/converter.C +++ b/src/converter.C @@ -295,10 +295,13 @@ bool Converters::convert(Buffer const * buffer, // 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" -- 2.39.2