Skip to content

Commit

Permalink
#384: add: create update folder if it not exists
Browse files Browse the repository at this point in the history
  • Loading branch information
YaWK committed Mar 24, 2023
1 parent c605d9a commit 96b8683
Showing 1 changed file with 6 additions and 0 deletions.
6 changes: 6 additions & 0 deletions system/classes/update.php
Original file line number Diff line number Diff line change
Expand Up @@ -265,6 +265,12 @@ public function generateLocalFilebase(object $db, array $lang): void
// set path and filename of the ini file
$updatePath = '/system/update/';
$updateFolder = $this->base_dir.$updatePath;

if (!is_dir($updateFolder)){
if (!mkdir($updateFolder, 0777, true) && !is_dir($updateFolder)) {
throw new \RuntimeException(sprintf('Unable to create "%s" - please check folder permissions or create folder by hand', $updateFolder));
}
}
$iniFileName = 'filebase.current.ini';
$input_folder = $this->base_dir;
$output_file = $updateFolder.$iniFileName;
Expand Down

0 comments on commit 96b8683

Please sign in to comment.