From 1ab03a82dd44b590f696045747068aea373d5bf8 Mon Sep 17 00:00:00 2001 From: =?utf8?q?Paul=20H=C3=A4nsch?= Date: Thu, 21 Apr 2022 15:04:59 +0200 Subject: [PATCH] make sure cache dir exists --- attachment.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/attachment.sh b/attachment.sh index 9b5d545..89b90ae 100755 --- a/attachment.sh +++ b/attachment.sh @@ -17,7 +17,7 @@ attachment_convert(){ elif [ -f "$cachepath" ]; then printf %s "$attpath" return 0 - elif ! touch "$cachepath"; then + elif ! mkdir -p -- "${cachepath%/*}" && touch "$cachepath"; then printf %s "$attpath" return 0 fi -- 2.39.2