places: make sure data is deleted

pull/395/head
Varun Patil 2023-02-06 07:54:25 -08:00
parent a43316353b
commit 8018edd5b2
1 changed files with 7 additions and 0 deletions

View File

@ -340,6 +340,13 @@ class PlacesSetup extends Command
$txtfile = sys_get_temp_dir().'/planet_coarse_boundaries.txt'; $txtfile = sys_get_temp_dir().'/planet_coarse_boundaries.txt';
unlink($txtfile); unlink($txtfile);
if (file_exists($txtfile)) {
$this->output->writeln('<error>Failed to delete planet file</error>');
$this->output->writeln("Please delete {$txtfile} manually");
exit;
}
$filename = sys_get_temp_dir().'/planet_coarse_boundaries.zip'; $filename = sys_get_temp_dir().'/planet_coarse_boundaries.zip';
$fp = fopen($filename, 'w+'); $fp = fopen($filename, 'w+');