diff --git a/src/Helper/GridHelperService.php b/src/Helper/GridHelperService.php index 51ad8d82e..59136ac54 100644 --- a/src/Helper/GridHelperService.php +++ b/src/Helper/GridHelperService.php @@ -928,6 +928,11 @@ public function createXlsxExportFile(FilesystemOperator $storage, string $fileHa */ private function optimizedConcatLike(string $fullpath): string { + //special case for the root folder + if($fullpath === '/') { + return '`path` LIKE "/%"'; + } + $pathParts = explode('/', $fullpath); $leaf = array_pop($pathParts); $path = implode('/', $pathParts); @@ -935,7 +940,7 @@ private function optimizedConcatLike(string $fullpath): string return '( (`path` = "' . $path . '/" AND `key` = "' . $leaf . '") OR - `path` LIKE "' . $fullpath . '%" + `path` LIKE "' . $fullpath . '/%" )'; }