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