diff --git a/procio.cr b/procio.cr index a1d5fe3..147fa82 100644 --- a/procio.cr +++ b/procio.cr @@ -2,7 +2,7 @@ dir = Path[ENV.fetch("PROCIO_DIR", "/proc")] result = {} of String => Array(UInt64) time = Time.local.to_s("%s%9N") -Dir.entries(dir).each do |entry| +Dir.children(dir).each do |entry| next unless (entry =~ /^\d+$/) && File.directory?(dir/entry) begin