From 21f4ccc8f559dbc56142019b40515b04ded8a24b Mon Sep 17 00:00:00 2001 From: Olivier Duchateau Date: Thu, 12 Feb 2015 06:46:37 +0000 Subject: [PATCH] On BSD systems, stat command has option '-f' (equivalent of '-c' under Linux) --- dialogs/appearance-settings/appearance-install-theme | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/dialogs/appearance-settings/appearance-install-theme b/dialogs/appearance-settings/appearance-install-theme index 6dc1e17..d669b3f 100755 --- a/dialogs/appearance-settings/appearance-install-theme +++ b/dialogs/appearance-settings/appearance-install-theme @@ -89,7 +89,11 @@ fi # check file size, abort if bigger then 50Mb, only works for files if test x"`which stat 2>/dev/null`" != x""; then - dndsize=`stat -c %s "$dndfilename"` + if test "`uname -s`" = "Linux"; then + dndsize=`stat -c %s "$dndfilename"` + else + dndsize=`stat -f %z "$dndfilename"` + fi if test "$dndsize" -gt 52428800; then # 2: File too big exit 2 -- 2.3.0