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