mirror of https://codeberg.org/anemofilia/zero
radio: files: lf: Make sure ${XDG_CACHE_HOME}/lf exists
parent
d63425c074
commit
545e8ee5fe
|
@ -20,8 +20,13 @@ batorcat() {
|
||||||
fi
|
fi
|
||||||
}
|
}
|
||||||
|
|
||||||
|
mkdir -p "${XDG_CACHE_HOME}/lf"
|
||||||
|
|
||||||
FILE=$(readlink -f "$1")
|
FILE=$(readlink -f "$1")
|
||||||
CACHE="$HOME/.cache/lf/thumbnail.$(stat --printf '%n\0%i\0%F\0%s\0%W\0%Y' -- "$FILE" | sha256sum | awk '{print $1}')"
|
HASH="$(stat --printf '%n\0%i\0%F\0%s\0%W\0%Y' -- "$FILE" \
|
||||||
|
| sha256sum \
|
||||||
|
| awk '{print $1}')"
|
||||||
|
CACHE="${XDG_CACHE_HOME}/lf/thumbnail.${HASH}"
|
||||||
|
|
||||||
case "${FILE}" in
|
case "${FILE}" in
|
||||||
*.bmp|*.jpg|*.jpeg|*.png|*.xpm|*.webp|*.gif|*.jfif)
|
*.bmp|*.jpg|*.jpeg|*.png|*.xpm|*.webp|*.gif|*.jfif)
|
||||||
|
|
Loading…
Reference in New Issue