diff options
author | Maxence Lange <maxence@artificial-owl.com> | 2023-11-07 15:55:24 -0100 |
---|---|---|
committer | GitHub <noreply@github.com> | 2023-11-07 15:55:24 -0100 |
commit | d9c24f6c7b8b9135817054e00d8b23bfae9c7da2 (patch) | |
tree | e3a284e7f08599b0e1fd793ac704a40f182a30ca /apps/files | |
parent | 3e6642ab0b4d0a95ef4ebff8553ae93a6b9e6d00 (diff) | |
parent | 363153626175532f471db0dd09e9421d1264765c (diff) | |
download | nextcloud-server-d9c24f6c7b8b9135817054e00d8b23bfae9c7da2.tar.gz nextcloud-server-d9c24f6c7b8b9135817054e00d8b23bfae9c7da2.zip |
Merge pull request #40761 from nextcloud/enh/noid/files-metadata
IFilesMetadata
Diffstat (limited to 'apps/files')
-rw-r--r-- | apps/files/lib/Command/Scan.php | 15 |
1 files changed, 12 insertions, 3 deletions
diff --git a/apps/files/lib/Command/Scan.php b/apps/files/lib/Command/Scan.php index f5ac3627196..b1fc25bfe9b 100644 --- a/apps/files/lib/Command/Scan.php +++ b/apps/files/lib/Command/Scan.php @@ -11,6 +11,7 @@ * @author Joel S <joel.devbox@protonmail.com> * @author Jörn Friedrich Dreyer <jfd@butonic.de> * @author martin.mattel@diemattels.at <martin.mattel@diemattels.at> + * @author Maxence Lange <maxence@artificial-owl.com> * @author Robin Appelman <robin@icewind.nl> * @author Roeland Jago Douma <roeland@famdouma.nl> * @author Thomas Müller <thomas.mueller@tmit.eu> @@ -37,17 +38,19 @@ use OC\Core\Command\Base; use OC\Core\Command\InterruptedException; use OC\DB\Connection; use OC\DB\ConnectionAdapter; +use OC\FilesMetadata\FilesMetadataManager; +use OC\ForbiddenException; +use OC\Metadata\MetadataManager; +use OCP\EventDispatcher\IEventDispatcher; use OCP\Files\Events\FileCacheUpdated; use OCP\Files\Events\NodeAddedToCache; use OCP\Files\Events\NodeRemovedFromCache; use OCP\Files\File; -use OC\ForbiddenException; -use OC\Metadata\MetadataManager; -use OCP\EventDispatcher\IEventDispatcher; use OCP\Files\IRootFolder; use OCP\Files\Mount\IMountPoint; use OCP\Files\NotFoundException; use OCP\Files\StorageNotAvailableException; +use OCP\FilesMetadata\IFilesMetadataManager; use OCP\IUserManager; use Psr\Log\LoggerInterface; use Symfony\Component\Console\Helper\Table; @@ -69,6 +72,7 @@ class Scan extends Base { private IUserManager $userManager, private IRootFolder $rootFolder, private MetadataManager $metadataManager, + private FilesMetadataManager $filesMetadataManager, private IEventDispatcher $eventDispatcher, private LoggerInterface $logger, ) { @@ -140,6 +144,11 @@ class Scan extends Base { if ($node instanceof File) { $this->metadataManager->generateMetadata($node, false); } + + $this->filesMetadataManager->refreshMetadata( + $node, + IFilesMetadataManager::PROCESS_LIVE | IFilesMetadataManager::PROCESS_BACKGROUND + ); } }); |