Commit 6c142f85 authored by Tobias Reich's avatar Tobias Reich
Browse files

Check if given import-path is a dir

parent 653511e6
......@@ -119,6 +119,11 @@ class Import extends Module {
if (!isset($path)) $path = LYCHEE_UPLOADS_IMPORT;
if (is_dir($path)===false) {
Log::error($database, __METHOD__, __LINE__, 'Given path is not a directory (' . $path . ')');
return 'Error: Given path is not a directory!';
if ($useTemp===true) {
$path = Import::move($database, $path);
if ($path===false) {
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment