mirror of
https://github.com/unraid/webgui.git
synced 2026-04-23 10:38:50 -05:00
Fixed share/disk size calculation when names include space
This commit is contained in:
@@ -22,9 +22,8 @@ function check {
|
||||
total=$(($total + $size))
|
||||
fi
|
||||
}
|
||||
shares=$(ls -vd /mnt/user/*)
|
||||
for share in $shares; do
|
||||
while IFS=$'\n' read -r share; do
|
||||
[[ -d $share ]] && check "$(basename "$share")" "$disk"
|
||||
done
|
||||
done <<< $(ls -vd /mnt/user/*)
|
||||
echo "share.total=$total" >>"$output"
|
||||
echo "total disk usage: $total"
|
||||
|
||||
@@ -23,9 +23,8 @@ function check {
|
||||
}
|
||||
|
||||
check "/mnt/cache" "$share"
|
||||
disks=$(ls -vd /mnt/disk*)
|
||||
for disk in $disks ; do
|
||||
while IFS=$'\n' read -r disk; do
|
||||
check "$disk" "$share"
|
||||
done
|
||||
done <<< $(ls -vd /mnt/disk[0-9]*)
|
||||
echo "disk.total=$total" >>"$output"
|
||||
echo "total disk usage: $total"
|
||||
|
||||
Reference in New Issue
Block a user