Insee : check integrity
This commit is contained in:
parent
98b0c533fb
commit
7006862c68
@ -113,7 +113,9 @@ if ($opts->cron || $oneShot) {
|
||||
echo date('Y-m-d H:i:s') . " - Telechargement $file\n";
|
||||
$command = "cd $storageDir; curl -s -S $FTP_OPTION -O " . $FTP_URL . $file;
|
||||
exec($command);
|
||||
if (file_exists($storageDir.'/'.$file)) {
|
||||
// --- Test integrity
|
||||
exec('unzip -t '.$storageDir.'/'.$file, $output, $integrity);
|
||||
if ($integrity == 0 && file_exists($storageDir.'/'.$file)) {
|
||||
$type = 'insee';
|
||||
$ftpSize = filesize($storageDir.'/'.$file);
|
||||
$ftpDate = date ("YmdHis", filemtime($storageDir.'/'.$file));
|
||||
|
Loading…
Reference in New Issue
Block a user