From c71a21f62dc6d6b535bbfba62bfb015b4c0be32a Mon Sep 17 00:00:00 2001 From: hut Date: Sun, 19 Jul 2009 03:33:07 +0200 Subject: commit 632d6ae done right (refresh dirs when entering) --- code/directory.rb | 4 ++++ code/fm.rb | 2 +- 2 files changed, 5 insertions(+), 1 deletion(-) diff --git a/code/directory.rb b/code/directory.rb index d00a2eb6..870ecbb1 100644 --- a/code/directory.rb +++ b/code/directory.rb @@ -247,5 +247,9 @@ class Directory @files_raw = files.map{|x| x.to_s} @files = files end + + def changed? + File.mtime(@path) != @mtime + end end diff --git a/code/fm.rb b/code/fm.rb index 6426dd14..974e8c65 100644 --- a/code/fm.rb +++ b/code/fm.rb @@ -217,7 +217,7 @@ module Fm end @pwd = @path.last - @pwd.refresh + @pwd.refresh! if @pwd.changed? @pwd.pos = @pwd.pos ## initialize directories in @pwd -- cgit 1.4.1-2-gfad0