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
parent db916ace66
commit d6d25e9ec6
1 changed files with 2 additions and 0 deletions

View File

@ -82,6 +82,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;
}