diff --git a/src/woeusb b/src/woeusb index 9d34e22..b3cb693 100755 --- a/src/woeusb +++ b/src/woeusb @@ -1104,11 +1104,9 @@ workaround_buggy_motherboards_that_ignore_disks_without_boot_flag_toggled(){ check_fat32_filesize_limitation(){ util_check_function_parameters_quantity 1 $# local -r source_fs_mountpoint="${1}" - local IFS_backup=$IFS - IFS=$'\n' - for file in ` find "${source_fs_mountpoint}" -type f `; do - if (( $(stat -c "%s" $file) > 4294967295 )); then # Max fat32 file size is 2^32 - 1 bytes + while IFS= read -r -d '' file; do + if (( "$(stat -c '%s' "${file}")" > 4294967295 )); then # Max fat32 file size is 2^32 - 1 bytes printf_with_color\ red\ 'Error: File "%s" in source image has exceed the FAT32 Filesystem 4GiB Single File Size Limitation and cannot be installed. You must specify a different --target-filesystem.\n'\ @@ -1116,13 +1114,9 @@ check_fat32_filesize_limitation(){ prntf_with_color\ red\ 'Refer: https://github.com/slacka/WoeUSB/wiki/Limitations#fat32-filesystem-4gib-single-file-size-limitation for more info.\n' - IFS=$IFS_backup - unset IFS_backup return 1 fi - done - IFS=$IFS_backup - unset IFS_backup + done < <(find "${source_fs_mountpoint}" -type f) return 0 }; declare -fr check_fat32_filesize_limitation