From 857ffc408ecbcbebfd4ace2a444e618e324a4d61 Mon Sep 17 00:00:00 2001 From: Taco Hoekwater Date: Mon, 6 Jun 2011 11:20:16 +0000 Subject: A fix for filepaths with spaces in context mkii (possibly partial) git-svn-id: svn://tug.org/texlive/trunk@22820 c570f23f-e606-0410-a88d-b1316a301751 --- Master/texmf-dist/scripts/context/lua/mtxrun.lua | 6 ++++-- Master/texmf-dist/scripts/context/stubs/mswin/mtxrun.lua | 6 ++++-- Master/texmf-dist/scripts/context/stubs/unix/mtxrun | 6 ++++-- 3 files changed, 12 insertions(+), 6 deletions(-) (limited to 'Master/texmf-dist/scripts/context') diff --git a/Master/texmf-dist/scripts/context/lua/mtxrun.lua b/Master/texmf-dist/scripts/context/lua/mtxrun.lua index 5ca97db588e..f0b07dddd4b 100755 --- a/Master/texmf-dist/scripts/context/lua/mtxrun.lua +++ b/Master/texmf-dist/scripts/context/lua/mtxrun.lua @@ -14532,11 +14532,13 @@ function runners.execute_script(fullname,internal,nosplit) environment.ownscript = result dofile(result) else + local quotedresult = result + if string.match(result,' ') and not string.match(result,"^\".*\"$") then quotedresult = '"' .. result .. '"' end local binary = runners.applications[file.extname(result)] if binary and binary ~= "" then - result = binary .. " " .. result + quotedresult = binary .. " " .. quotedresult end - local command = result .. " " .. environment.reconstructcommandline(environment.arguments_after,noquote) + local command = quotedresult .. " " .. environment.reconstructcommandline(environment.arguments_after,noquote) if e_verbose then report() report("executing: %s",command) diff --git a/Master/texmf-dist/scripts/context/stubs/mswin/mtxrun.lua b/Master/texmf-dist/scripts/context/stubs/mswin/mtxrun.lua index 5ca97db588e..f0b07dddd4b 100755 --- a/Master/texmf-dist/scripts/context/stubs/mswin/mtxrun.lua +++ b/Master/texmf-dist/scripts/context/stubs/mswin/mtxrun.lua @@ -14532,11 +14532,13 @@ function runners.execute_script(fullname,internal,nosplit) environment.ownscript = result dofile(result) else + local quotedresult = result + if string.match(result,' ') and not string.match(result,"^\".*\"$") then quotedresult = '"' .. result .. '"' end local binary = runners.applications[file.extname(result)] if binary and binary ~= "" then - result = binary .. " " .. result + quotedresult = binary .. " " .. quotedresult end - local command = result .. " " .. environment.reconstructcommandline(environment.arguments_after,noquote) + local command = quotedresult .. " " .. environment.reconstructcommandline(environment.arguments_after,noquote) if e_verbose then report() report("executing: %s",command) diff --git a/Master/texmf-dist/scripts/context/stubs/unix/mtxrun b/Master/texmf-dist/scripts/context/stubs/unix/mtxrun index 5ca97db588e..f0b07dddd4b 100755 --- a/Master/texmf-dist/scripts/context/stubs/unix/mtxrun +++ b/Master/texmf-dist/scripts/context/stubs/unix/mtxrun @@ -14532,11 +14532,13 @@ function runners.execute_script(fullname,internal,nosplit) environment.ownscript = result dofile(result) else + local quotedresult = result + if string.match(result,' ') and not string.match(result,"^\".*\"$") then quotedresult = '"' .. result .. '"' end local binary = runners.applications[file.extname(result)] if binary and binary ~= "" then - result = binary .. " " .. result + quotedresult = binary .. " " .. quotedresult end - local command = result .. " " .. environment.reconstructcommandline(environment.arguments_after,noquote) + local command = quotedresult .. " " .. environment.reconstructcommandline(environment.arguments_after,noquote) if e_verbose then report() report("executing: %s",command) -- cgit v1.2.3