issue #195: user-specific tempdir for expanding template modules
Steve Donovan
7 years ago
773 | 773 | local builtin_style, builtin_template = match_bang(args.style),match_bang(args.template) |
774 | 774 | if builtin_style or builtin_template then |
775 | 775 | -- '!' 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) | |
777 | 778 | if not path.isdir(tmpdir) then |
778 | 779 | lfs.mkdir(tmpdir) |
779 | 780 | end |