summaryrefslogtreecommitdiffstats
path: root/apps
diff options
context:
space:
mode:
authorRobin Appelman <robin@icewind.nl>2023-09-19 12:42:53 +0200
committerRobin Appelman <robin@icewind.nl>2023-09-19 13:58:35 +0200
commitccf8843d9fcf7d57c3c90da2d46913ca88b0ba70 (patch)
tree62680e0fba2d9ea55e4386563cf88411171725a5 /apps
parent5bf34979feb5b1f5b8bd4e2c0d002f8aaf8794e1 (diff)
downloadnextcloud-server-ccf8843d9fcf7d57c3c90da2d46913ca88b0ba70.tar.gz
nextcloud-server-ccf8843d9fcf7d57c3c90da2d46913ca88b0ba70.zip
apply known mtime wrapper for external storages
Signed-off-by: Robin Appelman <robin@icewind.nl>
Diffstat (limited to 'apps')
-rw-r--r--apps/files_external/lib/Config/ConfigAdapter.php28
1 files changed, 10 insertions, 18 deletions
diff --git a/apps/files_external/lib/Config/ConfigAdapter.php b/apps/files_external/lib/Config/ConfigAdapter.php
index 7f7c5e3e2eb..1b83688418c 100644
--- a/apps/files_external/lib/Config/ConfigAdapter.php
+++ b/apps/files_external/lib/Config/ConfigAdapter.php
@@ -31,6 +31,7 @@ namespace OCA\Files_External\Config;
use OC\Files\Storage\FailedStorage;
use OC\Files\Storage\Wrapper\Availability;
+use OC\Files\Storage\Wrapper\KnownMtime;
use OCA\Files_External\Lib\PersonalMount;
use OCA\Files_External\Lib\StorageConfig;
use OCA\Files_External\Service\UserGlobalStoragesService;
@@ -40,29 +41,17 @@ use OCP\Files\Storage;
use OCP\Files\Storage\IStorageFactory;
use OCP\Files\StorageNotAvailableException;
use OCP\IUser;
+use Psr\Clock\ClockInterface;
/**
* Make the old files_external config work with the new public mount config api
*/
class ConfigAdapter implements IMountProvider {
-
- /** @var UserStoragesService */
- private $userStoragesService;
-
- /** @var UserGlobalStoragesService */
- private $userGlobalStoragesService;
-
- /**
- * @param UserStoragesService $userStoragesService
- * @param UserGlobalStoragesService $userGlobalStoragesService
- */
public function __construct(
- UserStoragesService $userStoragesService,
- UserGlobalStoragesService $userGlobalStoragesService
- ) {
- $this->userStoragesService = $userStoragesService;
- $this->userGlobalStoragesService = $userGlobalStoragesService;
- }
+ private UserStoragesService $userStoragesService,
+ private UserGlobalStoragesService $userGlobalStoragesService,
+ private ClockInterface $clock,
+ ) {}
/**
* Process storage ready for mounting
@@ -155,7 +144,10 @@ class ConfigAdapter implements IMountProvider {
$this->userStoragesService,
$storageConfig,
$storageConfig->getId(),
- $storage,
+ new KnownMtime([
+ 'storage' => $storage,
+ 'clock' => $this->clock,
+ ]),
'/' . $user->getUID() . '/files' . $storageConfig->getMountPoint(),
null,
$loader,