mirror of
https://git.lyx.org/repos/lyx.git
synced 2025-01-11 19:14:51 +00:00
UNDO: single quotes in filenames are possible
git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@32582 a592a061-630c-0410-9148-cb99ea01b6c8
This commit is contained in:
parent
3efb1572a2
commit
21686c0bbf
@ -82,7 +82,7 @@ string const parsecmd(string const & cmd, string & outfile)
|
|||||||
|
|
||||||
for (size_t i = 0; i < cmd.length(); ++i) {
|
for (size_t i = 0; i < cmd.length(); ++i) {
|
||||||
char c = cmd[i];
|
char c = cmd[i];
|
||||||
if ((c == '"' || c == '\'') && !escaped)
|
if (c == '"' && !escaped)
|
||||||
inquote = !inquote;
|
inquote = !inquote;
|
||||||
else if (c == '\\' && !escaped)
|
else if (c == '\\' && !escaped)
|
||||||
escaped = !escaped;
|
escaped = !escaped;
|
||||||
@ -103,11 +103,7 @@ string const parsecmd(string const & cmd, string & outfile)
|
|||||||
int Systemcall::startscript(Starttype how, string const & what, bool process_events)
|
int Systemcall::startscript(Starttype how, string const & what, bool process_events)
|
||||||
{
|
{
|
||||||
string outfile;
|
string outfile;
|
||||||
QString cmd = toqstr(parsecmd(what, outfile));
|
QString cmd = toqstr(parsecmd(what, outfile));
|
||||||
if (cmd.contains("'")) {
|
|
||||||
LYXERR0("Systemcall: '" << cmd << "' contains single quotes ', please check configuration, ' will be replaced by \"");
|
|
||||||
cmd = cmd.replace("'","\"");
|
|
||||||
}
|
|
||||||
|
|
||||||
SystemcallPrivate d(outfile);
|
SystemcallPrivate d(outfile);
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user