Delete temporary file before reporting error
Signed-off-by: Michal Čihař <michal@cihar.com>
This commit is contained in:
parent
3ee65fc8bf
commit
48764f2260
@ -130,6 +130,14 @@ class ImportShp extends ImportPlugin
|
||||
}
|
||||
}
|
||||
|
||||
// Delete the .dbf file extracted to 'TempDir'
|
||||
if ($temp_dbf_file
|
||||
&& isset($dbf_file_path)
|
||||
&& file_exists($dbf_file_path)
|
||||
) {
|
||||
unlink($dbf_file_path);
|
||||
}
|
||||
|
||||
// Load data
|
||||
$shp->loadFromFile('');
|
||||
if ($shp->lastError != "") {
|
||||
@ -142,14 +150,6 @@ class ImportShp extends ImportPlugin
|
||||
return;
|
||||
}
|
||||
|
||||
// Delete the .dbf file extracted to 'TempDir'
|
||||
if ($temp_dbf_file
|
||||
&& isset($dbf_file_path)
|
||||
&& file_exists($dbf_file_path)
|
||||
) {
|
||||
unlink($dbf_file_path);
|
||||
}
|
||||
|
||||
$esri_types = array(
|
||||
0 => 'Null Shape',
|
||||
1 => 'Point',
|
||||
|
||||
Loading…
Reference in New Issue
Block a user