From 0f73349753859210e8c9542c662cc82543dfc52b Mon Sep 17 00:00:00 2001 From: Llewellyn van der Merwe Date: Fri, 15 Dec 2023 11:41:57 +0200 Subject: [PATCH 1/2] Fix spaces in bind-hooks paths --- tomb | 3 +++ 1 file changed, 3 insertions(+) diff --git a/tomb b/tomb index b02a3a41..54f335c4 100755 --- a/tomb +++ b/tomb @@ -2594,8 +2594,11 @@ exec_safe_bind_hooks() { # each line, using zsh word separator array subscript _bindhooks="${mapfile[${mnt}/bind-hooks]}" for h in ${(f)_bindhooks}; do + h=${h//\\ /__ESC_SPACE__} s="${h[(w)1]}" d="${h[(w)2]}" + s=${s//__ESC_SPACE__/ } + d=${d//__ESC_SPACE__/ } [[ -z $s ]] && { _warning "bind-hooks file is broken"; return 1 } [[ -z $d ]] && { _warning "bind-hooks file is broken"; return 1 } maps+=($s $d) From 7ec5453029c21ceda63c239d4484d5ee63129d9f Mon Sep 17 00:00:00 2001 From: Llewellyn van der Merwe Date: Sat, 16 Dec 2023 09:56:55 +0200 Subject: [PATCH 2/2] Fix umount issue when path have spaces in directory or file name --- tomb | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/tomb b/tomb index 54f335c4..151e49ba 100755 --- a/tomb +++ b/tomb @@ -3141,7 +3141,7 @@ umount_tomb() { bind_mapper="${b[(ws:;:)1]}" bind_mount="${b[(ws:;:)2]}" _message "Closing tomb bind hook: ::1 hook::" "$bind_mount" - _sudo umount "$bind_mount" || + _sudo umount "$(echo "$bind_mount")" || _failure "Tomb bind hook ::1 hook:: is busy, cannot close tomb." "$bind_mount" done