Skip to content

Commit fe5d86c

Browse files
committed
refactor: Port away from OC_Util::tearDownFS
Signed-off-by: Carl Schwan <carlschwan@kde.org>
1 parent 5974fc7 commit fe5d86c

2 files changed

Lines changed: 4 additions & 11 deletions

File tree

apps/files/lib/BackgroundJob/ScanFiles.php

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -14,6 +14,7 @@
1414
use OCP\BackgroundJob\TimedJob;
1515
use OCP\DB\QueryBuilder\IQueryBuilder;
1616
use OCP\EventDispatcher\IEventDispatcher;
17+
use OCP\Files\ISetupManager;
1718
use OCP\IConfig;
1819
use OCP\IDBConnection;
1920
use OCP\IUserManager;
@@ -56,7 +57,7 @@ protected function runScanner(string $user): void {
5657
} catch (\Exception $e) {
5758
$this->logger->error($e->getMessage(), ['exception' => $e, 'app' => 'files']);
5859
}
59-
\OC_Util::tearDownFS();
60+
$this->setupManager->tearDown();
6061
}
6162

6263
/**
@@ -123,10 +124,10 @@ private function getAllMountedStorages(): array {
123124
}
124125

125126
/**
126-
* @param $argument
127+
* @param $argument
127128
* @throws \Exception
128129
*/
129-
protected function run($argument) {
130+
protected function run($argument): void {
130131
if ($this->config->getSystemValueBool('files_no_background_scan', false)) {
131132
return;
132133
}

build/psalm-baseline.xml

Lines changed: 0 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -1201,14 +1201,6 @@
12011201
<code><![CDATA[$this->fileIsEncrypted]]></code>
12021202
</TypeDoesNotContainType>
12031203
</file>
1204-
<file src="apps/files/lib/BackgroundJob/ScanFiles.php">
1205-
<DeprecatedClass>
1206-
<code><![CDATA[\OC_Util::tearDownFS()]]></code>
1207-
</DeprecatedClass>
1208-
<DeprecatedMethod>
1209-
<code><![CDATA[\OC_Util::tearDownFS()]]></code>
1210-
</DeprecatedMethod>
1211-
</file>
12121204
<file src="apps/files/lib/Command/Object/Multi/Users.php">
12131205
<DeprecatedMethod>
12141206
<code><![CDATA[getUsersForUserValue]]></code>

0 commit comments

Comments
 (0)