summaryrefslogtreecommitdiffstats
path: root/lib
diff options
context:
space:
mode:
Diffstat (limited to 'lib')
-rw-r--r--lib/garbage.sh10
1 files changed, 5 insertions, 5 deletions
diff --git a/lib/garbage.sh b/lib/garbage.sh
index dcec7ed..d5e35cd 100644
--- a/lib/garbage.sh
+++ b/lib/garbage.sh
@@ -31,7 +31,7 @@ collect_garbage()
# it is supported by the GNU and BusyBox implementations of date.
cur_time=$(date '+%s')
- for garbage in "${archive}/.db/garbage/"*; do
+ for garbage in "${opt_base_dir}/.db/garbage/"*; do
if [ ! -f "${garbage}" ]; then
continue
fi
@@ -40,10 +40,10 @@ collect_garbage()
break
fi
while read -r dirs file; do
- rm -f "${archive}/${file}"
+ rm -f "${opt_base_dir}/${file}"
while [ ${dirs} -gt 0 ]; do
file="${file%/*}"
- try_rmdir "${archive}/${file}"
+ try_rmdir "${opt_base_dir}/${file}"
dirs=$(($dirs - 1))
done
done <<-EOF
@@ -63,6 +63,6 @@ mark_pool_garbage()
time=$(date '+%s')
time=$(($time + $conf_pool_gc_delay))
- mkdir -p "${archive}/.db/garbage"
- printf '2 %s\n' "${file}" >>"${archive}/.db/garbage/${time}"
+ mkdir -p "${opt_base_dir}/.db/garbage"
+ printf '2 %s\n' "${file}" >>"${opt_base_dir}/.db/garbage/${time}"
}