diff options
Diffstat (limited to 'init.lua')
| -rw-r--r-- | init.lua | 5 |
1 files changed, 3 insertions, 2 deletions
@@ -14,7 +14,7 @@ -- If not, see <https://www.gnu.org/licenses/>. local M = {} M.directory = '${XDG_STATE_HOME:-${HOME}/.local/state}/vis/locks' -M.directory_expanded = false +M.directory_expanded = nil -- Helper to execute a command and capture its output local function capture_cmd(cmd) @@ -29,8 +29,9 @@ local function capture_cmd(cmd) end local function get_lock_dir() - if not M.directory_expanded then + if M.directory_expanded ~= M.directory then M.directory = capture_cmd('printf %s "' .. M.directory .. '"') + M.directory_expanded = M.directory end return M.directory end |
