Skip to content

Commit 3667ab8

Browse files
committed
Merge branch '1.0'
2 parents 348a95f + 0f4f91d commit 3667ab8

1 file changed

Lines changed: 14 additions & 5 deletions

File tree

src/events/install.php

Lines changed: 14 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -146,10 +146,24 @@
146146
CommandLine::system('Making ' . $cwd . '/config/schema');
147147
mkdir($cwd . '/config/schema', 0777);
148148
}
149+
150+
if (!is_dir($cwd . '/config/packages')) {
151+
CommandLine::system('Making ' . $cwd . '/config/packages');
152+
mkdir($cwd . '/config/packages', 0777);
153+
}
149154
}
150155

151156
//chmod compiled, log, config, public/upload
152157
if(!$request->hasStage('skip-chmod')) {
158+
// special case for config folder
159+
$configDirectories = glob($cwd . '/config/*', GLOB_ONLYDIR);
160+
161+
// map each directories
162+
foreach($configDirectories as $directory) {
163+
CommandLine::system('chmoding ' . $directory);
164+
chmod($directory, 0777);
165+
}
166+
153167
if (is_dir($cwd . '/compiled')) {
154168
CommandLine::system('chmoding ' . $cwd . '/compiled');
155169
chmod($cwd . '/compiled', 0777);
@@ -160,11 +174,6 @@
160174
chmod($cwd . '/log', 0777);
161175
}
162176

163-
if (is_dir($cwd . '/config')) {
164-
CommandLine::system('chmoding ' . $cwd . '/config');
165-
chmod($cwd . '/config', 0777);
166-
}
167-
168177
if (is_dir($cwd . '/public/upload')) {
169178
CommandLine::system('chmoding ' . $cwd . '/public/upload');
170179
chmod($cwd . '/public/upload', 0777);

0 commit comments

Comments
 (0)