Corrections of Import::url
This commit is contained in:
parent
e39d84f1b2
commit
399619c6e8
@ -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;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user