From 36f2bf64401ba6fc812f64f2851e9a3f3fabf0f1 Mon Sep 17 00:00:00 2001 From: mwiegand Date: Thu, 11 Aug 2022 11:32:05 +0200 Subject: [PATCH] Dir.entries -> Dir.children --- procio.cr | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) 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