From 54593e4a42a67b8c7e961e8b839d26770b245fac Mon Sep 17 00:00:00 2001 From: chaideqing Date: Mon, 19 Jun 2023 10:33:25 +0800 Subject: [PATCH] * Fix bug#35977. --- module/extension/model.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/module/extension/model.php b/module/extension/model.php index 5290a937b7..c4214f2f39 100644 --- a/module/extension/model.php +++ b/module/extension/model.php @@ -444,7 +444,7 @@ class extensionModel extends model else { $parentDir = mb_substr($path, 0, strripos($path, '/')); - if(!is_writable($parentDir)) + if(is_dir($parentDir) and !is_writable($parentDir)) { $checkResult->errors .= sprintf($this->lang->extension->errorTargetPathNotWritable, $path) . '
'; $checkResult->chmodCommands .= "sudo chmod -R 777 $path
";