summary refs log tree commit diff stats
path: root/ranger.rb
diff options
context:
space:
mode:
authorhut <hut@lavabit.com>2009-06-13 04:12:18 +0200
committerhut <hut@lavabit.com>2009-06-13 04:12:18 +0200
commitbd627dc4f2d009642de3ada13cbdc547490baf68 (patch)
tree116e882dd0d303cd8999e1a83c47965ba4a9458b /ranger.rb
parentf55eb9bf0d7d2c252a6591324bfd8392d30c53da (diff)
downloadranger-bd627dc4f2d009642de3ada13cbdc547490baf68.tar.gz
fixing & cleaning up
Diffstat (limited to 'ranger.rb')
-rwxr-xr-xranger.rb14
1 files changed, 9 insertions, 5 deletions
diff --git a/ranger.rb b/ranger.rb
index 6f3f3aa2..3d930d4e 100755
--- a/ranger.rb
+++ b/ranger.rb
@@ -39,11 +39,6 @@ load 'data/apps.rb'
 load 'data/colorscheme/default.rb'
 load 'data/screensaver/clock.rb'
 
-unless ARGV.empty? or File.directory?(pwd)
-	exec(Fm.getfilehandler_frompath(pwd))
-end
-
-include CLI
 include Debug
 
 Debug.setup( :name   => 'nyuron',
@@ -52,6 +47,15 @@ Debug.setup( :name   => 'nyuron',
 
 ERROR_STREAM = File.open('/tmp/errorlog', 'a')
 
+if pwd and !ARGV.empty? and !File.directory?(pwd)
+	file = Directory::Entry.new(pwd)
+	file.get_data
+	Action.run(RunContext.new(file, 0, 'c'))
+	exit
+end
+
+include CLI
+
 Signal.trap(Scheduler::UPDATE_SIGNAL) do
 	Fm.refresh
 end