fix for bug #872: Folders not holding any images are ignored, even if they hold subfolders with images

This commit is contained in:
Bjoern Schiessle 2012-06-08 16:24:31 +02:00
parent a7a861b2c6
commit 0722ff6e32
1 changed files with 30 additions and 24 deletions

View File

@ -136,9 +136,15 @@ class OC_Gallery_Scanner {
if(array_search($path,$paths)===false){
$paths[]=$path;
}
// add sub path also if they don't contain images
while ( ($path = dirname($path)) != '/') {
if(array_search($path,$paths)===false){
$paths[]=$path;
}
}
$subs = dirname($path);
}
sort($paths);
return $paths;
}
}