From 8299c238fe4e19d6c796e6d1ab72a76808ba5f0b Mon Sep 17 00:00:00 2001 From: Carl Schwan Date: Wed, 22 Jul 2026 15:37:40 +0200 Subject: [PATCH] fix: Don't add empty and broken ExternalShareScanJob on upgrade This is added manually in apps/files_sharing/lib/Controller/ExternalSharesController.php when needed and with arguments. Signed-off-by: Carl Schwan --- apps/files_sharing/appinfo/info.xml | 1 - apps/files_sharing/lib/BackgroundJob/ExternalShareScanJob.php | 4 ++++ 2 files changed, 4 insertions(+), 1 deletion(-) diff --git a/apps/files_sharing/appinfo/info.xml b/apps/files_sharing/appinfo/info.xml index 42a8bcb635d5d..02631161794b2 100644 --- a/apps/files_sharing/appinfo/info.xml +++ b/apps/files_sharing/appinfo/info.xml @@ -35,7 +35,6 @@ Turning the feature off removes shared files and folders on the server for all s OCA\Files_Sharing\ExpireSharesJob OCA\Files_Sharing\SharesReminderJob OCA\Files_Sharing\BackgroundJob\FederatedSharesDiscoverJob - OCA\Files_Sharing\BackgroundJob\ExternalShareScanJob diff --git a/apps/files_sharing/lib/BackgroundJob/ExternalShareScanJob.php b/apps/files_sharing/lib/BackgroundJob/ExternalShareScanJob.php index 597e19bbcebe1..71379c8b11f11 100644 --- a/apps/files_sharing/lib/BackgroundJob/ExternalShareScanJob.php +++ b/apps/files_sharing/lib/BackgroundJob/ExternalShareScanJob.php @@ -35,6 +35,10 @@ protected function run($argument): void { } [$userId, $path] = $argument; + if ($userId === null || $userId === '') { + return; + } + try { $this->rootFolder ->getUserFolder($userId)