diff options
Diffstat (limited to 'tex/context/base/m-zint.mkiv')
-rw-r--r-- | tex/context/base/m-zint.mkiv | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/tex/context/base/m-zint.mkiv b/tex/context/base/m-zint.mkiv index c439476c2..95b265c57 100644 --- a/tex/context/base/m-zint.mkiv +++ b/tex/context/base/m-zint.mkiv @@ -47,6 +47,9 @@ local function numberofcode(code) if not reverse then local types = os.resultof(format("%s --types",zint)) or "" local formats = lpeg.match(pattern,types) + if not formats or not next(formats) then + return code + end reverse = table.swapped(formats) or { } end code = cleancode(code) @@ -65,7 +68,8 @@ function moduledata.zint.generate(code,data,suffix,options) local code = numberofcode(code) logs.simple("using 'zint' to generate '%s'",base) io.savedata(temp,data) - os.execute(format('%s --barcode=%s --output="%s" --input="%s"',zint,code,name,temp,options or "")) + os.execute(format('%s --barcode=%s --output="%s" --input="%s" %s',zint,code,name,temp,options or "")) + os.remove(temp) end return name end |