mirror of
https://github.com/Karaka-Management/oms-Search.git
synced 2026-01-11 10:38:40 +00:00
fix permission check
This commit is contained in:
parent
2f5262f8aa
commit
1fcaa98eba
|
|
@ -45,11 +45,15 @@ final class Installer extends InstallerAbstract
|
||||||
*/
|
*/
|
||||||
public static function install(ApplicationAbstract $app, ModuleInfo $info, SettingsInterface $cfgHandler) : void
|
public static function install(ApplicationAbstract $app, ModuleInfo $info, SettingsInterface $cfgHandler) : void
|
||||||
{
|
{
|
||||||
if (!\is_writable(__DIR__ . '/SearchCommands.php')) {
|
if (!\is_writable(__DIR__ . '/')) {
|
||||||
throw new PermissionException(__DIR__ . '/SearchCommands.php');
|
throw new PermissionException(__DIR__ . '/');
|
||||||
}
|
}
|
||||||
|
|
||||||
if (\is_file(__DIR__ . '/SearchCommands.php')) {
|
if (\is_file(__DIR__ . '/SearchCommands.php')) {
|
||||||
|
if (!\is_writable(__DIR__ . '/SearchCommands.php')) {
|
||||||
|
throw new PermissionException(__DIR__ . '/SearchCommands.php');
|
||||||
|
}
|
||||||
|
|
||||||
\unlink(__DIR__ . '/SearchCommands.php');
|
\unlink(__DIR__ . '/SearchCommands.php');
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue
Block a user