Merge pull request #3162 from annando/bugfix-spooling
Bugfix: Only delete spool files that are spool files
This commit is contained in:
commit
78715c8671
1 changed files with 6 additions and 0 deletions
|
@ -35,7 +35,13 @@ function spool_post_run($argv, $argc) {
|
||||||
continue;
|
continue;
|
||||||
}
|
}
|
||||||
$arr = json_decode(file_get_contents($fullfile), true);
|
$arr = json_decode(file_get_contents($fullfile), true);
|
||||||
|
if (!is_array($arr)) {
|
||||||
|
continue;
|
||||||
|
}
|
||||||
$result = item_store($arr);
|
$result = item_store($arr);
|
||||||
|
if ($result == 0) {
|
||||||
|
continue;
|
||||||
|
}
|
||||||
logger("Spool file ".$file." stored: ".$result, LOGGER_DEBUG);
|
logger("Spool file ".$file." stored: ".$result, LOGGER_DEBUG);
|
||||||
unlink($fullfile);
|
unlink($fullfile);
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue