mirror of
https://github.com/aclist/dztui.git
synced 2026-08-25 17:32:36 +02:00
fix: store filepaths in array
I opted to encapsulate these in an array because I was paranoid about needing to separate each directory with a whitespace when storing them on a stringwise basis. This should be safer and ensure the paths don't get concatenated together if the whitespace is omitted.
This commit is contained in:
parent
d0de2974d8
commit
ec7daf7f6b
17
dzgui.sh
17
dzgui.sh
@ -86,14 +86,15 @@ logger(){
|
||||
}
|
||||
|
||||
setup_dirs(){
|
||||
directories="$state_path "
|
||||
directories+="$cache_path "
|
||||
directories+="$share_path "
|
||||
directories+="$helpers_path "
|
||||
directories+="$freedesktop_path "
|
||||
directories+="$config_path "
|
||||
directories+="$log_path "
|
||||
for dir in $directories; do
|
||||
directories=()
|
||||
directories+=("$state_path")
|
||||
directories+=("$cache_path")
|
||||
directories+=("$share_path")
|
||||
directories+=("$helpers_path")
|
||||
directories+=("$freedesktop_path")
|
||||
directories+=("$config_path")
|
||||
directories+=("$log_path")
|
||||
for dir in "${directories[@]}"; do
|
||||
mkdir -p "$dir"
|
||||
done
|
||||
}
|
||||
|
||||
Loading…
Reference in New Issue
Block a user