|
|
@@ -52,7 +52,7 @@ def directory_hash(path, name=nil) |
|
|
|
data = {:data => (name || path)} |
|
|
|
data[:children] = children = [] |
|
|
|
Dir.foreach(path) do |entry| |
|
|
|
next if (entry == '..' || entry == '.' || entry == '.git' || entry.include?('index') || entry.include?('.sh') || entry.include?('.swp') ) |
|
|
|
next if (entry == '..' || entry == '.' || entry == '.git' || entry.include?('index') || entry.include?('.sh') || entry.include?('.swp') || entry.include?('.png') || entry.include?('.jpg') || entry.include?('.jpeg') ) |
|
|
|
full_path = File.join(path, entry) |
|
|
|
if File.directory?(full_path) |
|
|
|
children << directory_hash(full_path, entry) |
|
|
|