Browse Source

Added logging for subfolders

Tobias Reich 10 years ago
parent
commit
5689278908
1 changed files with 5 additions and 1 deletions
  1. 5 1
      php/modules/Import.php

+ 5 - 1
php/modules/Import.php

@@ -160,7 +160,11 @@ class Import extends Module {
 					continue;
 				}
 
-				Import::server($newAlbumID, $file . '/', false);
+				if (Import::server($newAlbumID, $file . '/', false)==='Warning: Folder empty or no readable files to process!') {
+					$error = true;
+					Log::error($database, __METHOD__, __LINE__, 'Could not import folder. Function returned error');
+					continue;
+				}
 
 				$contains['albums'] = true;