about summary refs log tree commit diff stats
diff options
context:
space:
mode:
authorhut <hut@lavabit.com>2009-07-19 23:23:15 +0200
committerhut <hut@lavabit.com>2009-07-19 23:23:15 +0200
commitc8f012b431d418277e71dedd3374c97bdcb017e9 (patch)
tree46a43778eeb463acc3bbeb14543e7579180b7c99
parent79ed1dfa8f327ab0aa2ed943bc822e62e47f5cc8 (diff)
downloadranger-c8f012b431d418277e71dedd3374c97bdcb017e9.tar.gz
display owner and group next to rights
-rw-r--r--code/draw.rb6
1 files changed, 4 insertions, 2 deletions
diff --git a/code/draw.rb b/code/draw.rb
index e8a1ccdc..0686c815 100644
--- a/code/draw.rb
+++ b/code/draw.rb
@@ -1,4 +1,5 @@
 require 'socket'
+require 'etc'
 
 module Fm
 	DONT_PREVIEW_THESE_FILES = /\.(avi|[mj]pe?g|iso|mp\d|og[gmv]|wm[av]|mkv|torrent|so|class|flv|png|bmp|vob|divx?)$/i
@@ -292,9 +293,10 @@ module Fm
 			when 't'
 				puti btm, "Toggle (h)idden_files (d)irs_first (f)ilepreview (p)review (w)idebar (c)d (!)confirm"
 			else
+				owner = "#{Etc.getpwuid(cf.stat.uid).name}:#{Etc.getgrgid(cf.stat.gid).name}"
 				attr_set(Color.base)
 				attr_set(Color.info)
-				puti btm, "#@buffer    #{@pwd.file_size.bytes(false)}, #{@pwd.free_space.bytes(false)} free, #{@pwd.size}, #{@pwd.pos+1}    ".rjust(cols)
+				puti btm, "#@buffer    #{@pwd.file_size.bytes(false)}, #{@pwd.free_space.bytes(false)} free    ".rjust(cols)
 				more = ''
 				if cf.symlink?
 					more = "#{cf.readlink.ascii_only_if(Option.ascii_only)}"
@@ -305,7 +307,7 @@ module Fm
 				puti btm, left
 
 				attr_set(cf.writable? ? Color.allowed : Color.denied)
-				second = "#{cf.rights} "
+				second = "#{cf.rights} #{owner} "
 				puti btm, left.size, second
 				if more
 					attr_set(cf.exists? ? Color.allowed : Color.denied)