From 3882af22643f0cc41e8715f436e61b891dc291b9 Mon Sep 17 00:00:00 2001 From: Menno van Leeuwen Date: Sat, 2 Nov 2024 22:02:36 +0100 Subject: [PATCH] bugfix symlinks parent directory missing --- bin/helpers/functions.sh | 3 +++ 1 file changed, 3 insertions(+) diff --git a/bin/helpers/functions.sh b/bin/helpers/functions.sh index 1d44100..418a979 100755 --- a/bin/helpers/functions.sh +++ b/bin/helpers/functions.sh @@ -226,6 +226,9 @@ check_or_make_symlink() { SOURCE="${SOURCE/#\~/$HOME}" TARGET="${TARGET/#\~/$HOME}" + # Ensure the parent directory of the target exists + mkdir -p "$(dirname "$TARGET")" + SOURCE=$(resolve_path "$SOURCE") TARGET=$(resolve_path "$TARGET")