From 09f18e9fbcc0e15a262f98ff9c01997f14add2b8 Mon Sep 17 00:00:00 2001 From: hut Date: Fri, 24 Jul 2009 03:10:19 +0200 Subject: don't ask for file owner if there's no file --- code/draw.rb | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) 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) -- cgit 1.4.1-2-gfad0