diff options
-rw-r--r-- | apps/contacts/import.php | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/apps/contacts/import.php b/apps/contacts/import.php index ed1b80e132a..7d3acf86cf8 100644 --- a/apps/contacts/import.php +++ b/apps/contacts/import.php @@ -80,6 +80,11 @@ $imported = 0; $failed = 0; if(!count($parts) > 0) { OCP\JSON::error(array('data' => array('message' => 'No contacts to import in '.$_POST['file'].'. Please check if the file is corrupted.', 'file'=>$_POST['file']))); + if(isset($_POST['fstype']) && $_POST['fstype'] == 'OC_FilesystemView') { + if(!$view->unlink('/imports/' . $_POST['file'])) { + OCP\Util::writeLog('contacts','Import: Error unlinking OC_FilesystemView ' . '/' . $_POST['file'], OCP\Util::ERROR); + } + } exit(); } foreach($parts as $part){ |