Bugfix: Only delete spool files that are spool files

This commit is contained in:
Michael 2017-02-14 21:13:00 +00:00
parent 3fbf3af343
commit 7ba5228814

View file

@ -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);
}