From 706e7bad3dc0828ac6c1cb30b95b17b1a5ad9b38 Mon Sep 17 00:00:00 2001 From: Piotr Strzelczyk Date: Wed, 3 Jul 2013 21:54:11 +0000 Subject: fix for psview and UNC paths in unix-style git-svn-id: svn://tug.org/texlive/trunk@31085 c570f23f-e606-0410-a88d-b1316a301751 --- Master/bin/win32/runscript.tlu | 17 +++++++---------- 1 file changed, 7 insertions(+), 10 deletions(-) (limited to 'Master/bin/win32/runscript.tlu') diff --git a/Master/bin/win32/runscript.tlu b/Master/bin/win32/runscript.tlu index bdb092b9cab..665cb91a955 100755 --- a/Master/bin/win32/runscript.tlu +++ b/Master/bin/win32/runscript.tlu @@ -232,6 +232,9 @@ local docstr = [[ - added alias for fmtutil 2013/05/09 - added alias mkluatexfontdb -> luaotfload-tool + 2013/07/03 + - fix for psview and UNC paths in unix-style + - remove not needed is_abs_path function ]] -- HELPER SUBROUTINES -- @@ -242,11 +245,6 @@ local function _q(str) return string.find(str, "%s") and '"'..str..'"' or str end --- checks if path is absolute (but not if it actually exists) -local function is_abs_path(fpath) - return string.find(fpath, '^[a-zA-Z]:[/\\]') and true or false -end - -- prepends directories to path if they are not already there local function prepend_path(path, ...) local pathcmp = string.lower(string.gsub(path, '/', '\\'))..';' @@ -328,8 +326,7 @@ end local function check_command(cmdlist, PATH) for cmd in string.gmatch(cmdlist, '%S+') do local cmdext = cmd..(string.find(cmd, '%.[^\\/.]*$') and '' or '.exe') - local fullcmd = is_abs_path(cmdext) and lfs.isfile(cmdext) and - cmdext or search_path(cmdext, PATH) + local fullcmd = search_path(cmdext, PATH) if fullcmd then return fullcmd, cmd end @@ -546,9 +543,9 @@ elseif progname == 'psv' then argline = '-sINPUT='..argline ARGV = {[0]=TEXDIR..'/tlpkg/tlpsv/gswxlua.exe', 'gswxlua', '-dDisableFAPI=true', - '-l', _q(TEXDIR..'/tlpkg/tlpsv/psv.wx.lua'), - '-i', '.', - '-p', _q(TEXDIR..'/tlpkg/tlpsv/psv_view.ps')} + '-l', (_q(TEXDIR..'/tlpkg/tlpsv/psv.wx.lua'):gsub('/','\\')), + '-p', (_q(TEXDIR..'/tlpkg/tlpsv/psv_view.ps'):gsub('/','\\')), + '-i', '.'} elseif progname == 'repstopdf' or progname == 'rpdfcrop' then argline = '--restricted ' .. argline progname = string.sub(progname, 2, -1) -- cgit v1.2.3