about summary refs log tree commit diff stats
diff options
context:
space:
mode:
authorhut <hut@lavabit.com>2009-07-24 03:10:19 +0200
committerhut <hut@lavabit.com>2009-07-24 03:10:19 +0200
commit09f18e9fbcc0e15a262f98ff9c01997f14add2b8 (patch)
tree4b4db82e8abb95f8d26acde892019dcb35062c65
parentcbda44e7ca9d957dd48b231b7d463e89d5081053 (diff)
downloadranger-09f18e9fbcc0e15a262f98ff9c01997f14add2b8.tar.gz
don't ask for file owner if there's no file
-rw-r--r--code/draw.rb6
1 files changed, 5 insertions, 1 deletions
diff --git a/code/draw.rb b/code/draw.rb
index ef1fd35b..46ba298e 100644
--- a/code/draw.rb
+++ b/code/draw.rb
@@ -297,7 +297,11 @@ module Fm
 			when 'f'
 				puti btm, "Find by (r)egexp (s)ize (h)andler (m)time (c)time"
 			else
-				owner = "#{Etc.getpwuid(cf.stat.uid).name}:#{Etc.getgrgid(cf.stat.gid).name}"
+				if cf.stat
+					owner = "#{Etc.getpwuid(cf.stat.uid).name}:#{Etc.getgrgid(cf.stat.gid).name}"
+				else
+					owner = ""
+				end
 				attr_set(Color.base)
 				attr_set(Color.info)
 				puti btm, "#@buffer  #{@pwd.file_size.bytes(false)}, #{@pwd.free_space.bytes(false)} free    ".rjust(cols)