summaryrefslogtreecommitdiff
path: root/ext/tk/sample/demos-en/tree.rb
diff options
context:
space:
mode:
Diffstat (limited to 'ext/tk/sample/demos-en/tree.rb')
-rw-r--r--ext/tk/sample/demos-en/tree.rb2
1 files changed, 1 insertions, 1 deletions
diff --git a/ext/tk/sample/demos-en/tree.rb b/ext/tk/sample/demos-en/tree.rb
index cd62ba8..69154ee 100644
--- a/ext/tk/sample/demos-en/tree.rb
+++ b/ext/tk/sample/demos-en/tree.rb
@@ -67,7 +67,7 @@ def populate_tree(tree, node)
path = tree.get(node, :fullpath)
tree.delete(tree.children(node))
Dir.glob("#{path}/*").sort.each{|f|
- type = File.ftype(f)
+ type = File.ftype(f) rescue nil
id = tree.insert(node, :end,
:text=>File.basename(f), :values=>[f, type]).id
if type == 'directory'