sanebox: fix tab typo when parsing the link cache

This commit is contained in:
Colin 2024-05-16 00:15:57 +00:00
parent b5502ea401
commit 4de3c6d664

View File

@ -797,8 +797,9 @@ loadLinkCache() {
# readarray -t: reads some file into an array; each line becomes one element # readarray -t: reads some file into an array; each line becomes one element
readarray -t _linkCacheArray < /etc/sanebox/symlink-cache readarray -t _linkCacheArray < /etc/sanebox/symlink-cache
for link in "${_linkCacheArray[@]}"; do for link in "${_linkCacheArray[@]}"; do
local from="${link%%\t*}" # XXX: bash doesn't give a good way to escape the tab character, but that's what we're splitting on here.
local to="${link##*\t}" local from="${link%% *}"
local to="${link##* }"
linkCache["$from"]="$to" linkCache["$from"]="$to"
done done
} }