diff --git a/apps/contacts/import.php b/apps/contacts/import.php index ed1b80e132a0a40a4480c093da4e16f60d2333b4..7d3acf86cf81217927e3bc9de9af2d60cdf5a0be 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){