Disabled ranger scope for files larger than 10 megabytes
This commit is contained in:
parent
f490e6e8ef
commit
fed90585a6
|
@ -160,7 +160,9 @@ handle_fallback() {
|
|||
exit 1
|
||||
}
|
||||
|
||||
size=$(stat -c%s "${FILE_PATH}") # file size in bytes
|
||||
|
||||
if [ $size -le 10485760 ]; then
|
||||
handle_extension
|
||||
#MIMETYPE="$( file --dereference --brief --mime-type -- "${FILE_PATH}" )"
|
||||
MIMETYPE="$(xdg-mime query filetype "${FILE_PATH}" )"
|
||||
|
@ -168,6 +170,8 @@ if [[ "${PV_IMAGE_ENABLED}" == 'True' ]]; then
|
|||
handle_image "${MIMETYPE}"
|
||||
fi
|
||||
handle_mime "${MIMETYPE}"
|
||||
fi
|
||||
|
||||
handle_fallback
|
||||
|
||||
exit 1
|
||||
|
|
Loading…
Reference in New Issue
Block a user