issue #195: user-specific tempdir for expanding template modules
This commit is contained in:
parent
dadad3f737
commit
2f71eabd9f
3
ldoc.lua
3
ldoc.lua
|
@ -774,7 +774,8 @@ end
|
|||
local builtin_style, builtin_template = match_bang(args.style),match_bang(args.template)
|
||||
if builtin_style or builtin_template then
|
||||
-- '!' here means 'use built-in templates'
|
||||
local tmpdir = path.join(path.is_windows and os.getenv('TMP') or '/tmp','ldoc')
|
||||
local user = path.expanduser('~'):gsub('[/\\ ]','_')
|
||||
local tmpdir = path.join(path.is_windows and os.getenv('TMP') or '/tmp','ldoc'..user)
|
||||
if not path.isdir(tmpdir) then
|
||||
lfs.mkdir(tmpdir)
|
||||
end
|
||||
|
|
Loading…
Reference in New Issue