diff --git a/library/Icinga/Cli/Loader.php b/library/Icinga/Cli/Loader.php index 14a387a47..3921c56c5 100644 --- a/library/Icinga/Cli/Loader.php +++ b/library/Icinga/Cli/Loader.php @@ -453,8 +453,9 @@ class Loader $cmd = strtolower($m[1]); $commands[] = $cmd; } - } - sort($commands); + } + closedir($base); + sort($commands); return $commands; }