else
$path = '/'.ltrim($path, '/');
if (strlen($path) > 1) $path = rtrim($path, '/');
- error_log($path);
$result = OC_Gallery_Album::find(OC_User::getUser(), null, $path);
$album_details = $result->fetchRow();
$current_album = array('name'=> $path, 'imagesCount' => 0, 'images' => array());
$current_album['name'] = self::createName($current_album['name']);
- if ($dh = OC_Filesystem::opendir($path)) {
+ if ($dh = OC_Filesystem::opendir($path.'/')) {
while (($filename = readdir($dh)) !== false) {
$filepath = ($path[strlen($path)-1]=='/'?$path:$path.'/').$filename;
if (substr($filename, 0, 1) == '.') continue;