Skip to content

Commit fce8b71

Browse files
committed
fix(LocalPreviewStorage): Use correct regex to detect files in nested directory format
Signed-off-by: David Dreschner <david.dreschner@nextcloud.com>
1 parent 1047d52 commit fce8b71

1 file changed

Lines changed: 1 addition & 1 deletion

File tree

lib/private/Preview/Storage/LocalPreviewStorage.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -281,7 +281,7 @@ private function processScanBatch(
281281

282282
// Move old flat preview to new nested directory format.
283283
$dirName = str_replace($this->getPreviewRootFolder(), '', $item['filePath']);
284-
if (preg_match('/[0-9a-e]\/[0-9a-e]\/[0-9a-e]\/[0-9a-e]\/[0-9a-e]\/[0-9a-e]\/[0-9a-e]\/[0-9]+/', $dirName) !== 1) {
284+
if (preg_match('/([[:xdigit:]]\/){7}[0-9]+/', $dirName) !== 1) {
285285
$previewPath = $this->constructPath($preview);
286286
$this->createParentFiles($previewPath);
287287
$ok = rename($item['realPath'], $previewPath);

0 commit comments

Comments
 (0)