diff options
Diffstat (limited to 'code')
-rw-r--r-- | code/runcontext.rb | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/code/runcontext.rb b/code/runcontext.rb index d3a0b9d1..df9f3a81 100644 --- a/code/runcontext.rb +++ b/code/runcontext.rb @@ -33,21 +33,21 @@ class RunContext end ## }}} - def initialize(files, mode=0, flags='') + def initialize(files, mode=nil, flags=nil, preferred_app=nil) @mode = mode.to_i if files.is_a? Array @files = files.dup else @files = [files.dup] end - self.flags = flags + self.flags = flags || '' @files.reject! {|file| file.handler == nil or !file.exists? } @handlers = @files.map {|file| file.handler} @paths = @files.map {|file| file.path} - @handler = @handlers.first + @handler = preferred_app || @handlers.first @multi = (@files.size > 1 and @handlers.uniq.size == 1) |