From 370ec80b313609974eac804aa4d0f9325222a9c1 Mon Sep 17 00:00:00 2001 From: =?utf8?q?Paul=20H=C3=A4nsch?= Date: Mon, 23 Sep 2024 05:33:53 +0200 Subject: [PATCH] always put caches in _DATA directory --- handlers/40_attachment.sh | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/handlers/40_attachment.sh b/handlers/40_attachment.sh index bddaa47..9ec1c69 100755 --- a/handlers/40_attachment.sh +++ b/handlers/40_attachment.sh @@ -20,8 +20,12 @@ attachment_convert(){ local attpath="$1" - local cachepath="${attpath%/#attachments/*}/#cache/${attpath#*/#attachments/}" - local res junk + local cachepath res junk + + # always put caches in data directory + [ "${attpath#"${_EXEC}"}" = "${attpath}" ] \ + && cachepath="${attpath}" || cachepath="${_DATA}${attpath#"${_EXEC}"}" + cachepath="${cachepath%/#attachments/*}/#cache/${cachepath#*/#attachments/}" case $attpath in *.webm|*.mp4|*.mkv|*.avi) -- 2.39.2