Added logging for folder deletion
This commit is contained in:
parent
08fe04c241
commit
0dc54c44e0
@ -169,7 +169,9 @@ class Import extends Module {
|
||||
}
|
||||
|
||||
# Delete tmpdir if import was successful
|
||||
if ($error===false&&$useTemp===true&&isset($tmpdirname)) rmdir(LYCHEE_DATA . $tmpdirname);
|
||||
if ($error===false&&$useTemp===true&&file_exists(LYCHEE_DATA . $tmpdirname)) {
|
||||
if (@rmdir(LYCHEE_DATA . $tmpdirname)===false) Log::error($database, __METHOD__, __LINE__, 'Could not delete temp-folder (' . LYCHEE_DATA . $tmpdirname . ') after successful import');
|
||||
}
|
||||
|
||||
if ($contains['photos']===false&&$contains['albums']===false) return 'Warning: Folder empty or no readable files to process!';
|
||||
if ($contains['photos']===false&&$contains['albums']===true) return 'Notice: Import only contains albums!';
|
||||
|
Loading…
Reference in New Issue
Block a user