summaryrefslogtreecommitdiff
path: root/tex/context/base/core-sys.lua
diff options
context:
space:
mode:
authorHans Hagen <pragma@wxs.nl>2013-04-16 12:08:00 +0200
committerHans Hagen <pragma@wxs.nl>2013-04-16 12:08:00 +0200
commitbc18e41199a3772d300a4fa68bd86402e23f4f7a (patch)
treef1ab9133705e4cc5157170cd4a66b6a7abcab474 /tex/context/base/core-sys.lua
parent18bb8026f624a646df0951b69f7d2dd718ca199c (diff)
downloadcontext-bc18e41199a3772d300a4fa68bd86402e23f4f7a.tar.gz
beta 2013.04.16 12:08
Diffstat (limited to 'tex/context/base/core-sys.lua')
-rw-r--r--tex/context/base/core-sys.lua17
1 files changed, 10 insertions, 7 deletions
diff --git a/tex/context/base/core-sys.lua b/tex/context/base/core-sys.lua
index 1741bbe0a..009ec16ea 100644
--- a/tex/context/base/core-sys.lua
+++ b/tex/context/base/core-sys.lua
@@ -67,15 +67,18 @@ function environment.initializefilenames() -- commands.updatefilenames(jobname,f
local jobfilename = jobname or inputfilename or tex.jobname or ""
local inputfilename = inputfilename or ""
- jobfilename = gsub(jobfilename, "^./","")
- inputfilename = gsub(inputfilename,"^./","")
+ local jobfilebase = basename(jobfilename)
+ local inputfilebase = basename(inputfilename)
- environment.jobfilename = jobfilename
- environment.jobfilesuffix = lower(suffixonly(jobfilename))
+ -- jobfilename = gsub(jobfilename, "^./","")
+ -- inputfilename = gsub(inputfilename,"^./","")
- environment.inputfilename = inputfilename
- environment.inputfilebarename = removesuffix(basename(inputfilename))
- environment.inputfilesuffix = lower(suffixonly(inputfilename))
+ environment.jobfilename = jobfilebase
+ environment.jobfilesuffix = lower(suffixonly(jobfilebase))
+
+ environment.inputfilename = inputfilename -- so here we keep e.g. ./ or explicit paths
+ environment.inputfilebarename = removesuffix(inputfilebase)
+ environment.inputfilesuffix = lower(suffixonly(inputfilebase))
environment.outputfilename = outputfilename or environment.inputfilebarename or ""