mirror of
https://github.com/friendica/friendica
synced 2025-04-25 08:30:11 +00:00
Bugfix for not createable spool path
This commit is contained in:
parent
4264518859
commit
2bfc40d74c
3 changed files with 65 additions and 24 deletions
|
@ -30,10 +30,24 @@ function spool_post_run($argv, $argc) {
|
|||
if (is_writable($path)){
|
||||
if ($dh = opendir($path)) {
|
||||
while (($file = readdir($dh)) !== false) {
|
||||
|
||||
// It is not named like a spool file, so we don't care.
|
||||
if (substr($file, 0, 5) != "item-") {
|
||||
continue;
|
||||
}
|
||||
|
||||
$fullfile = $path."/".$file;
|
||||
|
||||
// We don't care about directories either
|
||||
if (filetype($fullfile) != "file") {
|
||||
continue;
|
||||
}
|
||||
|
||||
// We can't read or write the file? So we don't care about it.
|
||||
if (!is_writable($fullfile) OR !is_readable($fullfile)) {
|
||||
continue;
|
||||
}
|
||||
|
||||
$arr = json_decode(file_get_contents($fullfile), true);
|
||||
|
||||
// If it isn't an array then it is no spool file
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue