Bugfix: Only delete spool files that are spool files
This commit is contained in:
parent
3fbf3af343
commit
7ba5228814
1 changed files with 6 additions and 0 deletions
|
@ -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