Corrections of Import::url

This commit is contained in:
Quentin Ligier 2016-03-19 10:21:29 +01:00
parent e39d84f1b2
commit 399619c6e8

View File

@ -65,13 +65,12 @@ final class Import {
continue; continue;
} }
$pathinfo = pathinfo($url); $filename = pathinfo($url, PATHINFO_FILENAME) . $extension;
$filename = $pathinfo['filename'] . '.' . $pathinfo['extension'];
$tmp_name = LYCHEE_DATA . $filename; $tmp_name = LYCHEE_DATA . $filename;
if (@copy($url, $tmp_name)===false) { if (@copy($url, $tmp_name)===false) {
$error = true; $error = true;
Log::error(Database::get(), __METHOD__, __LINE__, 'Could not copy file (' . $tmp_name . ') to temp-folder (' . $tmp_name . ')'); Log::error(Database::get(), __METHOD__, __LINE__, 'Could not copy file (' . $url . ') to temp-folder (' . $tmp_name . ')');
continue; continue;
} }