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