~修复设置小闪存目录时的报错

This commit is contained in:
juewuy
2026-10-24 17:15:24 +08:00
parent 3615268631
commit a09506b3b3
+3 -3
View File
@@ -155,8 +155,8 @@ setboot() {
set_usb_dir() {
while true; do
comp_box "$SETBOOT_SELECT_INSTALL_DIR"
du -hL /mnt |
awk '{print NR") "$2" ($SETBOOT_SPACE_USED$1")"}' |
du -hL -d 2 /mnt |
awk '{print NR") "$2" ($SETBOOT_SPACE_USED"$1")"}' |
while IFS= read -r line; do
content_line "$line"
done
@@ -164,7 +164,7 @@ setboot() {
content_line "0) $COMMON_BACK"
separator_line "="
read -r -p "$COMMON_INPUT> " num
BINDIR=$(du -hL /mnt | awk '{print $2}' | sed -n "$num"p)
BINDIR=$(du -hL -d 2 /mnt | awk '{print $2}' | sed -n "$num"p)
if [ "$num" = 0 ]; then
return 1
elif [ -z "$BINDIR" ]; then