From 4dcc77f638829110b8b6417272fcbf07bde64a24 Mon Sep 17 00:00:00 2001 From: Florian Fischer Date: Sun, 11 Jun 2023 14:38:12 +0200 Subject: fix log file creation for paths including spaces --- init.lua | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/init.lua b/init.lua index e2a51b6..bcf6099 100644 --- a/init.lua +++ b/init.lua @@ -104,7 +104,7 @@ do local log_file_fmt = log_dir .. '/%s-%s.log' local timestamp = os.date('%Y-%m-%dT%H:%M:%S') local cwd = capture_cmd('pwd') - local basename_cwd = capture_cmd('basename ' .. cwd):match('^%s*(.-)%s*$') + local basename_cwd = capture_cmd('basename "' .. cwd .. '"'):match('^%s*(.-)%s*$') log_file = log_file_fmt:format(timestamp, basename_cwd) elseif type(log_file) == 'function' then -- cgit v1.2.3