summary refs log tree commit diff stats
path: root/ranger.py
diff options
context:
space:
mode:
authorhut <hut@lavabit.com>2011-09-28 23:38:23 +0200
committerhut <hut@lavabit.com>2011-09-28 23:38:23 +0200
commitbdc872b0178be74059f49d8878b5c05f2d7ed8ce (patch)
tree604a2f93103dbc1fa2a09a84cee3d8d46b6b60f4 /ranger.py
parent0da832e8c47261fed2e91463699f6505ba3269fa (diff)
downloadranger-bdc872b0178be74059f49d8878b5c05f2d7ed8ce.tar.gz
another correction of the bash wrapper scripts
Diffstat (limited to 'ranger.py')
-rwxr-xr-xranger.py3
1 files changed, 2 insertions, 1 deletions
diff --git a/ranger.py b/ranger.py
index 0991b451..1508b5de 100755
--- a/ranger.py
+++ b/ranger.py
@@ -23,7 +23,8 @@ if [ ! -z "$1" ]; then
 	ranger="$1"
 	shift
 	"$ranger" --choosedir="$tempfile" "${@:-$(pwd)}"
-	if [ -f "$tempfile" -a "$(cat -- "$tempfile")" != "$(echo -n `pwd`)" ]; then
+	test -f "$tempfile" &&
+	if [ "$(cat -- "$tempfile")" != "$(echo -n `pwd`)" ]; then
 		cd "$(cat "$tempfile")"
 		rm -f -- "$tempfile"
 	fi && return 0