Skip to content
This repository has been archived by the owner on Sep 4, 2024. It is now read-only.

Commit

Permalink
Merge pull request #2 from gnome-exe-thumbnailer/thumbnail-limit-fall…
Browse files Browse the repository at this point in the history
…back

Add a fallback if thumbnail_limit can't be fetched from gsettings
  • Loading branch information
jlu5 committed Apr 30, 2017
2 parents 400b806 + ba3e72b commit 0e5dbd1
Showing 1 changed file with 6 additions and 0 deletions.
6 changes: 6 additions & 0 deletions usr/bin/gnome-exe-thumbnailer
Original file line number Diff line number Diff line change
Expand Up @@ -185,8 +185,14 @@ case "$THEME" in
esac

INPUTFILE_SIZE=$(du -b "$INPUTFILE" | cut -f1 -d$'\t')
# Try to fetch the max. size for thumbnailed executables from gsettings, but fall back to 10485760 bytes if that fails.
THUMBNAIL_LIMIT=$(gsettings get org.gnome.nautilus.preferences thumbnail-limit | cut -f2 -d' ')

if [[ ! "$THUMBNAIL_LIMIT" ]]
then
THUMBNAIL_LIMIT=10485760
fi


if [[ ${INPUTFILE##*.} = 'msi' ]]
then
Expand Down

0 comments on commit 0e5dbd1

Please sign in to comment.