Codebase list lua-ldoc / 2f71eab
issue #195: user-specific tempdir for expanding template modules Steve Donovan 7 years ago
1 changed file(s) with 2 addition(s) and 1 deletion(s). Raw diff Collapse all Expand all
773773 local builtin_style, builtin_template = match_bang(args.style),match_bang(args.template)
774774 if builtin_style or builtin_template then
775775 -- '!' here means 'use built-in templates'
776 local tmpdir = path.join(path.is_windows and os.getenv('TMP') or '/tmp','ldoc')
776 local user = path.expanduser('~'):gsub('[/\\ ]','_')
777 local tmpdir = path.join(path.is_windows and os.getenv('TMP') or '/tmp','ldoc'..user)
777778 if not path.isdir(tmpdir) then
778779 lfs.mkdir(tmpdir)
779780 end