places-setup: fix unlink warnings
Signed-off-by: Varun Patil <radialapps@gmail.com>pull/653/head
parent
29d1e92421
commit
402e12b287
|
@ -97,10 +97,14 @@ class Places
|
|||
flush();
|
||||
|
||||
$filename = sys_get_temp_dir().'/planet_coarse_boundaries.zip';
|
||||
unlink($filename);
|
||||
if (file_exists($filename) && !unlink($filename)) {
|
||||
throw new \Exception("Failed to delete old planet zip file: $filename");
|
||||
}
|
||||
|
||||
$txtfile = sys_get_temp_dir().'/planet_coarse_boundaries.txt';
|
||||
unlink($txtfile);
|
||||
if (file_exists($txtfile) && !unlink($txtfile)) {
|
||||
throw new \Exception("Failed to delete old planet data file: $txtfile");
|
||||
}
|
||||
|
||||
$fp = fopen($filename, 'w+');
|
||||
|
||||
|
@ -130,7 +134,7 @@ class Places
|
|||
}
|
||||
|
||||
// Delete zip file
|
||||
unlink($filename);
|
||||
@unlink($filename);
|
||||
|
||||
return $txtfile;
|
||||
}
|
||||
|
@ -329,7 +333,7 @@ class Places
|
|||
$this->config->setSystemValue('memories.gis_type', $gis);
|
||||
|
||||
// Delete data file
|
||||
unlink($datafile);
|
||||
@unlink($datafile);
|
||||
}
|
||||
|
||||
/**
|
||||
|
|
Loading…
Reference in New Issue