about summary refs log tree commit diff stats
path: root/code/runcontext.rb
diff options
context:
space:
mode:
authorhut <hut@lavabit.com>2009-07-20 23:52:58 +0200
committerhut <hut@lavabit.com>2009-07-20 23:52:58 +0200
commite805ddb1fc16736a8735bbda16ee094f4c59e182 (patch)
treeb0fd78927f35220608170612c94c2728d16c7171 /code/runcontext.rb
parentce16309481e03604199470dea8b5aaef9dd0e282 (diff)
downloadranger-e805ddb1fc16736a8735bbda16ee094f4c59e182.tar.gz
fixed #11 (specify flags at data/types.rb)
Diffstat (limited to 'code/runcontext.rb')
-rw-r--r--code/runcontext.rb8
1 files changed, 7 insertions, 1 deletions
diff --git a/code/runcontext.rb b/code/runcontext.rb
index 882a10ef..aaccec9f 100644
--- a/code/runcontext.rb
+++ b/code/runcontext.rb
@@ -51,7 +51,13 @@ class RunContext
 		}
 		@handlers = @files.map {|file| file.handler}
 		@paths = @files.map {|file| file.path}
-		@handler = preferred_app || @handlers.first
+
+		if preferred_app
+			@handler = preferred_app
+		else
+			@handler = @handlers.first
+			self.base_flags = @files.first.baseflags
+		end
 
 		@multi = (@files.size > 1 and @handlers.uniq.size == 1)