From ef014f585c83958488f8349feba9c3eefbf2f419 Mon Sep 17 00:00:00 2001 From: Silvio Rhatto Date: Tue, 26 Nov 2013 12:26:33 -0200 Subject: Better mode check on keyringer_check_tmp (closes #30) --- lib/keyringer/functions | 7 +------ 1 file changed, 1 insertion(+), 6 deletions(-) diff --git a/lib/keyringer/functions b/lib/keyringer/functions index 8bad9ed..667b0cd 100755 --- a/lib/keyringer/functions +++ b/lib/keyringer/functions @@ -115,14 +115,9 @@ function keyringer_is_git { function keyringer_check_tmp { local path="$1" local major - local mode - - if [ -z "$path" ]; then - return - fi # Mode check - if [ "`stat -c "%A" $path`" != "drwxrwxrwt" ]; then + if [ -z "$path" ] || [ ! -d "$path" ] || [ ! -w "$path" ] || [ ! -x "$path" ]; then return 1 fi -- cgit v1.2.3