mirror of
https://github.com/nextcloud/server.git
synced 2026-05-22 01:55:56 -04:00
fix(LocalPreviewStorage): Use correct regex to detect files in nested directory format
Signed-off-by: David Dreschner <david.dreschner@nextcloud.com>
This commit is contained in:
parent
1047d52f52
commit
fce8b710df
1 changed files with 1 additions and 1 deletions
|
|
@ -281,7 +281,7 @@ class LocalPreviewStorage implements IPreviewStorage {
|
|||
|
||||
// Move old flat preview to new nested directory format.
|
||||
$dirName = str_replace($this->getPreviewRootFolder(), '', $item['filePath']);
|
||||
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) {
|
||||
if (preg_match('/([[:xdigit:]]\/){7}[0-9]+/', $dirName) !== 1) {
|
||||
$previewPath = $this->constructPath($preview);
|
||||
$this->createParentFiles($previewPath);
|
||||
$ok = rename($item['realPath'], $previewPath);
|
||||
|
|
|
|||
Loading…
Reference in a new issue