diff options
| author | Alin Mr <almr.oss@outlook.com> | 2024-05-02 19:46:10 +0000 |
|---|---|---|
| committer | Florian Fischer <florian.fischer@muhq.space> | 2024-05-03 08:29:10 +0200 |
| commit | e3e6ac024639feda5ff8743f8a968e5d1eb2fd64 (patch) | |
| tree | 793b7366b4c45553c692020c2129147fa6552f0b /init.lua | |
| parent | f92cb0ef715867016ff33cbe4d5f621b3c1c85bd (diff) | |
| download | vis-lockfiles-e3e6ac024639feda5ff8743f8a968e5d1eb2fd64.tar.gz vis-lockfiles-e3e6ac024639feda5ff8743f8a968e5d1eb2fd64.zip | |
init.lua: re-expand whenever M.directory changes
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 |
