diff options
-rw-r--r-- | scripts/libmakepkg/source/file.sh.in | 12 |
1 files changed, 12 insertions, 0 deletions
diff --git a/scripts/libmakepkg/source/file.sh.in b/scripts/libmakepkg/source/file.sh.in index b29aeb04..c11a1ec5 100644 --- a/scripts/libmakepkg/source/file.sh.in +++ b/scripts/libmakepkg/source/file.sh.in @@ -131,6 +131,18 @@ extract_file() { msg2 "$(gettext "Extracting %s with %s")" "$file" "$cmd" if [[ $cmd = "bsdtar" ]]; then $cmd -xf "$file" || ret=$? + if ((ret)); then + if LANG=en_US.utf8 $cmd -xf "$file"; then + res="$($cmd -vxf "$file" 2>&1 | grep -A1 "$utf_err")" + if [[ -n "$res" ]]; then + # warn and dump results + warning "this sourceball contains unicode filenames" + printf "$res\n" + + ret=0 + fi + fi + fi else rm -f -- "${file%.*}" $cmd -dcf -- "$file" > "${file%.*}" || ret=$? |