From 6172a793e21e4629cb1167a1b2e095bc9156c688 Mon Sep 17 00:00:00 2001 From: hut Date: Mon, 20 Jul 2009 22:21:05 +0200 Subject: made sure you stay at the same file on Directory.refresh --- code/directory.rb | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/code/directory.rb b/code/directory.rb index ef4f1ba6..ab636b0b 100644 --- a/code/directory.rb +++ b/code/directory.rb @@ -182,6 +182,8 @@ class Directory # end # end def refresh(info=false) + oldfile = @pointed_file + if File.mtime(@path) != @mtime read_dir end @@ -190,6 +192,10 @@ class Directory get_file_info end sort_if_needed + + if @files.include? oldfile + self.pointed_file = oldfile + end end def schedule() -- cgit 1.4.1-2-gfad0