Fix script invocation when scanning a directory

Since the directory was not preprended to the filenames, no scripts
could ever be called.
This commit is contained in:
Kienan Stewart 2018-07-27 13:09:33 -04:00 committed by Camille Lafitte
parent 52c27f4cbe
commit afafb3e4f6
1 changed files with 2 additions and 0 deletions

View File

@ -87,6 +87,8 @@ class m_hooks {
}
} else if (is_dir($scripts)) {
foreach (scandir($scripts) as $ccc) {
# scandir returns the file names only
$ccc = $scripts . '/' . $ccc;
if (is_file($ccc) && is_executable($ccc)) {
$to_launch[] = $ccc;
}