mirror of
https://github.com/limosek/zaf.git
synced 2024-11-13 05:59:06 +01:00
When cache is in tmp, automaticaly create it
This commit is contained in:
parent
006a9fc99b
commit
cc244ef791
@ -1,7 +1,11 @@
|
||||
# Zaf cache related functions
|
||||
|
||||
zaf_cache_init(){
|
||||
[ -z "$ZAF_CACHE_DIR" ] && ZAF_CACHE_DIR=${ZAF_TMP_DIR}/zafc
|
||||
if [ -z "$ZAF_CACHE_DIR" ] || [ "$ZAF_CACHE_DIR" = "/tmp/zafc" ]; then
|
||||
ZAF_CACHE_DIR=${ZAF_TMP_DIR}/zafc
|
||||
mkdir -p $ZAF_CACHE_DIR
|
||||
chown $ZAF_FILES_UID $ZAF_CACHE_DIR
|
||||
fi
|
||||
if [ -w $ZAF_CACHE_DIR ]; then
|
||||
zaf_trc "Cache: Removing stale entries"
|
||||
(cd $ZAF_CACHE_DIR && find ./ -type f -name '*.info' -mmin +1 2>/dev/null | \
|
||||
|
Loading…
Reference in New Issue
Block a user