bugfix symlinks parent directory missing

This commit is contained in:
Menno van Leeuwen 2024-11-02 22:02:36 +01:00
parent d0f795db57
commit 3882af2264
Signed by: vleeuwenmenno
SSH Key Fingerprint: SHA256:OJFmjANpakwD3F2Rsws4GLtbdz1TJ5tkQF0RZmF0TRE

View File

@ -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")