some golang style up in this bitch
Signed-off-by: fbt <fbt@fleshless.org>
This commit is contained in:
@@ -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
|
||||||
|
|||||||
Reference in New Issue
Block a user