mirror of
https://github.com/nextcloud/server.git
synced 2026-05-22 01:55:56 -04:00
Merge pull request #59961 from nextcloud/fix/use-correct-regex-for-previews
fix(LocalPreviewStorage): Use correct regex to detect files in nested directory format
This commit is contained in:
commit
020c4e9b59
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