diff --git a/ldoc.lua b/ldoc.lua index de09e68..2b2b3ae 100644 --- a/ldoc.lua +++ b/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