diff --git a/apps/gallery/lib/hooks_handlers.php b/apps/gallery/lib/hooks_handlers.php index 3c101b1f8a1..480e41a8bf9 100644 --- a/apps/gallery/lib/hooks_handlers.php +++ b/apps/gallery/lib/hooks_handlers.php @@ -68,7 +68,7 @@ class OC_Gallery_Hooks_Handlers { if (!self::isPhoto($fullpath)) return; - $path = substr($fullpath, 0, strrpos($fullpath, '/')); + $path = dirname($fullpath); if (!self::pathInRoot($path)) return; OC_Gallery_Scanner::scanDir($path, $albums);