lib/template/server.rb in browser_app_base-0.0.4 vs lib/template/server.rb in browser_app_base-0.0.5

- old
+ new

@@ -46,10 +46,11 @@ puts path Dir.glob(path, File::FNM_DOTMATCH).each do |file| data = {} next if File.basename(file) == "." next if kind == "dir" and !File.directory?(file) - data["label"] = File.expand_path(file) + data["label"] = File.basename(file) + data["label"] += "/" if (File.directory?(file)) data["value"] = File.expand_path(file) res.push data end JSON.generate res.sort { |a, b| a["value"] <=> b["value"] } end