some golang style up in this bitch

Signed-off-by: fbt <fbt@fleshless.org>
This commit is contained in:
2026-11-28 05:17:47 +00:00
parent a1710fccd7
commit 06558f0601
+11 -3
View File
@@ -124,12 +124,20 @@ handle_target() {
return 1 return 1
} }
IFS=';' read target_mimetype _ <<< "$file_raw" IFS=';' read -r target_mimetype _ <<< "$file_raw"
target_left=$target_mimetype target_left=$target_mimetype
[[ $target_mimetype == 'inode/symlink' ]] && \ [[ $target_mimetype == 'inode/symlink' ]] && {
IFS=';' read target_mimetype_true _ <<< $( file -ibL "$target" ) unset file_raw
file_raw=$( file -ibL "$target" )
(( $? )) && {
error "Failed to get mimetype, bailing"
return 1
}
IFS=';' read -r target_mimetype_true _ <<< "$file_raw"
}
set -- "${mime_handlers[@]}" set -- "${mime_handlers[@]}"
elif is_uri "$target"; then elif is_uri "$target"; then