Skip to content

Commit

Permalink
fix: temp file not properly created on windows
Browse files Browse the repository at this point in the history
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.
  • Loading branch information
MarcoBuess committed Mar 26, 2024
1 parent dade26f commit e88f796
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions lua/markmap/config.lua
Original file line number Diff line number Diff line change
Expand Up @@ -11,12 +11,12 @@ M.set = function(opts)
-- Setup options
M.html_output = opts.html_output or nil
M.hide_toolbar = opts.hide_toolbar or false
M.grace_period = opts.grace_period or 3600000 -- 60min
M.grace_period = opts.grace_period or 3600000 -- 60min

-- Set defaults: M.html_output
if M.html_output == nil then
if is_windows then
M.html_output = uv.os_getenv("TEMP" .. "\\" .. "markmap.html")
M.html_output = uv.os_getenv("TEMP") .. "\\" .. "markmap.html"
elseif is_android then
M.html_output = "/data/data/com.termux/files/usr/tmp/markmap.html"
else -- unix
Expand Down

0 comments on commit e88f796

Please sign in to comment.