diff options
Diffstat (limited to 'Master/texmf-dist')
4 files changed, 15 insertions, 16 deletions
diff --git a/Master/texmf-dist/scripts/context/lua/mtxrun.lua b/Master/texmf-dist/scripts/context/lua/mtxrun.lua index 29f2eadb437..5ca97db588e 100755 --- a/Master/texmf-dist/scripts/context/lua/mtxrun.lua +++ b/Master/texmf-dist/scripts/context/lua/mtxrun.lua @@ -2532,10 +2532,12 @@ function file.is_writable(name) os.remove(name) return true end - else + else + local existing = lfs.isfile(name) f = io.open(name,"ab") if f then f:close() + if not existing then os.remove(name) end return true end end @@ -11146,10 +11148,7 @@ resolvers.criticalvars = allocate { "SELFAUTOLOC", "SELFAUTODIR", "SELFAUTOPARE resolvers.luacnfname = 'texmfcnf.lua' resolvers.luacnfstate = "unknown" --- resolvers.luacnfspec = '{$SELFAUTODIR,$SELFAUTOPARENT}{,{/share,}/texmf{-local,}/web2c}' -- what a rubish path -resolvers.luacnfspec = 'selfautoparent:{/texmf{-local,}{,/web2c},}}' - - +resolvers.luacnfspec = '{selfautodir:,selfautoparent:};{selfautodir:,selfautoparent:}{/share,}/texmf{-local,};{selfautodir:,selfautoparent:}{/share,}/texmf{-local,}/web2c' local unset_variable = "unset" diff --git a/Master/texmf-dist/scripts/context/stubs/mswin/mtxrun.lua b/Master/texmf-dist/scripts/context/stubs/mswin/mtxrun.lua index 29f2eadb437..5ca97db588e 100755 --- a/Master/texmf-dist/scripts/context/stubs/mswin/mtxrun.lua +++ b/Master/texmf-dist/scripts/context/stubs/mswin/mtxrun.lua @@ -2532,10 +2532,12 @@ function file.is_writable(name) os.remove(name) return true end - else + else + local existing = lfs.isfile(name) f = io.open(name,"ab") if f then f:close() + if not existing then os.remove(name) end return true end end @@ -11146,10 +11148,7 @@ resolvers.criticalvars = allocate { "SELFAUTOLOC", "SELFAUTODIR", "SELFAUTOPARE resolvers.luacnfname = 'texmfcnf.lua' resolvers.luacnfstate = "unknown" --- resolvers.luacnfspec = '{$SELFAUTODIR,$SELFAUTOPARENT}{,{/share,}/texmf{-local,}/web2c}' -- what a rubish path -resolvers.luacnfspec = 'selfautoparent:{/texmf{-local,}{,/web2c},}}' - - +resolvers.luacnfspec = '{selfautodir:,selfautoparent:};{selfautodir:,selfautoparent:}{/share,}/texmf{-local,};{selfautodir:,selfautoparent:}{/share,}/texmf{-local,}/web2c' local unset_variable = "unset" diff --git a/Master/texmf-dist/scripts/context/stubs/unix/mtxrun b/Master/texmf-dist/scripts/context/stubs/unix/mtxrun index 29f2eadb437..5ca97db588e 100755 --- a/Master/texmf-dist/scripts/context/stubs/unix/mtxrun +++ b/Master/texmf-dist/scripts/context/stubs/unix/mtxrun @@ -2532,10 +2532,12 @@ function file.is_writable(name) os.remove(name) return true end - else + else + local existing = lfs.isfile(name) f = io.open(name,"ab") if f then f:close() + if not existing then os.remove(name) end return true end end @@ -11146,10 +11148,7 @@ resolvers.criticalvars = allocate { "SELFAUTOLOC", "SELFAUTODIR", "SELFAUTOPARE resolvers.luacnfname = 'texmfcnf.lua' resolvers.luacnfstate = "unknown" --- resolvers.luacnfspec = '{$SELFAUTODIR,$SELFAUTOPARENT}{,{/share,}/texmf{-local,}/web2c}' -- what a rubish path -resolvers.luacnfspec = 'selfautoparent:{/texmf{-local,}{,/web2c},}}' - - +resolvers.luacnfspec = '{selfautodir:,selfautoparent:};{selfautodir:,selfautoparent:}{/share,}/texmf{-local,};{selfautodir:,selfautoparent:}{/share,}/texmf{-local,}/web2c' local unset_variable = "unset" diff --git a/Master/texmf-dist/tex/context/base/l-file.lua b/Master/texmf-dist/tex/context/base/l-file.lua index 3fea3b0a7c4..66a14dd5765 100644 --- a/Master/texmf-dist/tex/context/base/l-file.lua +++ b/Master/texmf-dist/tex/context/base/l-file.lua @@ -155,10 +155,12 @@ function file.is_writable(name) os.remove(name) return true end - else + else + local existing = lfs.isfile(name) f = io.open(name,"ab") if f then f:close() + if not existing then os.remove(name) end return true end end |