about summary refs log tree commit diff stats
path: root/code/directory.rb
diff options
context:
space:
mode:
authorhut <hut@lavabit.com>2009-07-03 14:16:24 +0200
committerhut <hut@lavabit.com>2009-07-03 14:16:24 +0200
commit01104f4a929dbbf37366f40e5f45227304f3d7d6 (patch)
treecd62dff6e9015a396c0efa606603110fd30a3014 /code/directory.rb
parent2800fd920b9c400ba178c94c77ae77c999f28849 (diff)
downloadranger-01104f4a929dbbf37366f40e5f45227304f3d7d6.tar.gz
put options where they belong. in a config file
Diffstat (limited to 'code/directory.rb')
-rw-r--r--code/directory.rb10
1 files changed, 5 insertions, 5 deletions
diff --git a/code/directory.rb b/code/directory.rb
index 01634ca0..c738b995 100644
--- a/code/directory.rb
+++ b/code/directory.rb
@@ -27,7 +27,7 @@ class Directory
 		@mtime = File.mtime(@path)
 		log @path
 		@files = Dir.new(@path).to_a rescue []
-		if OPTIONS['hidden']
+		if Option.show_hidden
 			@files -= ['.', '..', 'lost+found']
 		else
 			@files.reject!{|x| x[0] == ?. or x == 'lost+found'}
@@ -160,7 +160,7 @@ class Directory
 
 #	def refresh()
 #		@files = Dir.new(@path).to_a
-#		if OPTIONS['hidden']
+#		if Option.hidden
 #			@files -= ['.', '..', 'lost+found']
 #		else
 #			@files.reject!{|x| x[0] == ?. or x == 'lost+found'}
@@ -203,7 +203,7 @@ class Directory
 	end
 
 	def sort_sub(x, y)
-		case OPTIONS['sort']
+		case Option.sort
 		when :name
 			x.basename <=> y.basename
 		when :ext
@@ -223,7 +223,7 @@ class Directory
 
 	def sort()
 		@files = @files.sort {|x,y|
-			if OPTIONS['dir_first']
+			if Option.dir_first
 				if x.dir?
 					if y.dir? then sort_sub(x, y) else -1 end
 				else
@@ -233,7 +233,7 @@ class Directory
 				sort_sub(x, y)
 			end
 		}
-		@files.reverse! if OPTIONS['sort_reverse']
+		@files.reverse! if Option.sort_reverse
 		@files_raw = @files.map{|x| x.to_s}
 	end
 end