mirror of
https://github.com/aclist/dztui.git
synced 2026-10-25 12:12:31 +01: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:
1 parent
d0de2974d8
commit
ec7daf7f6b
1 file changed
+9
-8
@@ -86,14 +86,15 @@ logger(){
|
|||||||
}
|
}
|
||||||
|
|
||||||
setup_dirs(){
|
setup_dirs(){
|
||||||
directories="$state_path "
|
directories=()
|
||||||
directories+="$cache_path "
|
directories+=("$state_path")
|
||||||
directories+="$share_path "
|
directories+=("$cache_path")
|
||||||
directories+="$helpers_path "
|
directories+=("$share_path")
|
||||||
directories+="$freedesktop_path "
|
directories+=("$helpers_path")
|
||||||
directories+="$config_path "
|
directories+=("$freedesktop_path")
|
||||||
directories+="$log_path "
|
directories+=("$config_path")
|
||||||
for dir in $directories; do
|
directories+=("$log_path")
|
||||||
|
for dir in "${directories[@]}"; do
|
||||||
mkdir -p "$dir"
|
mkdir -p "$dir"
|
||||||
done
|
done
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in new issue
Block a user