Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
12 changes: 12 additions & 0 deletions index.php
Original file line number Diff line number Diff line change
Expand Up @@ -391,6 +391,7 @@ public function checkWritePermissions(): void {
'.rnd',
'.well-known',
'data',
'themes'
];

$notWritablePaths = [];
Expand All @@ -399,6 +400,17 @@ public function checkWritePermissions(): void {
$notWritablePaths[] = $fileInfo->getFilename();
}
}
// Special handling for included default theme
foreach ($this->getRecursiveDirectoryIterator($this->nextcloudDir . '/themes/example', $excludedElements) as $path => $fileInfo) {
if (!$fileInfo->isWritable()) {
$notWritablePaths[] = $fileInfo->getFilename();
}
}
$themesReadmeFileInfo = new \SplFileInfo($this->nextcloudDir . '/themes/README');
if (!$themesReadmeFileInfo->isWritable()) {
$notWritablePaths[] = $themesReadmeFileInfo->getFilename();
}

if (count($notWritablePaths) > 0) {
throw new UpdateException($notWritablePaths);
}
Expand Down
12 changes: 12 additions & 0 deletions lib/Updater.php
Original file line number Diff line number Diff line change
Expand Up @@ -373,6 +373,7 @@ public function checkWritePermissions(): void {
'.rnd',
'.well-known',
'data',
'themes'
];

$notWritablePaths = [];
Expand All @@ -381,6 +382,17 @@ public function checkWritePermissions(): void {
$notWritablePaths[] = $fileInfo->getFilename();
}
}
// Special handling for included default theme
foreach ($this->getRecursiveDirectoryIterator($this->nextcloudDir . '/themes/example', $excludedElements) as $path => $fileInfo) {
if (!$fileInfo->isWritable()) {
$notWritablePaths[] = $fileInfo->getFilename();
}
}
$themesReadmeFileInfo = new \SplFileInfo($this->nextcloudDir . '/themes/README');
if (!$themesReadmeFileInfo->isWritable()) {
$notWritablePaths[] = $themesReadmeFileInfo->getFilename();
}

if (count($notWritablePaths) > 0) {
throw new UpdateException($notWritablePaths);
}
Expand Down
Binary file modified updater.phar
Binary file not shown.