Skip to content

Commit e88f796

Browse files
committed
fix: temp file not properly created on windows
There was an issue in reading the temp env variable caused by wrong paren in the `uv.os_getenv()` function. This caused a `--watch` file to be created in the cwd instead of the `markmap.html` in the temp directory.
1 parent dade26f commit e88f796

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

lua/markmap/config.lua

+2-2
Original file line numberDiff line numberDiff line change
@@ -11,12 +11,12 @@ M.set = function(opts)
1111
-- Setup options
1212
M.html_output = opts.html_output or nil
1313
M.hide_toolbar = opts.hide_toolbar or false
14-
M.grace_period = opts.grace_period or 3600000 -- 60min
14+
M.grace_period = opts.grace_period or 3600000 -- 60min
1515

1616
-- Set defaults: M.html_output
1717
if M.html_output == nil then
1818
if is_windows then
19-
M.html_output = uv.os_getenv("TEMP" .. "\\" .. "markmap.html")
19+
M.html_output = uv.os_getenv("TEMP") .. "\\" .. "markmap.html"
2020
elseif is_android then
2121
M.html_output = "/data/data/com.termux/files/usr/tmp/markmap.html"
2222
else -- unix

0 commit comments

Comments
 (0)