From 0e914b010dfca0b140dae433f4010aff84d4735e Mon Sep 17 00:00:00 2001 From: Lukas Schaefer Date: Fri, 31 Oct 2025 12:39:42 -0400 Subject: [PATCH] fix: undefined variable rootSharedWithMeImportFolder Signed-off-by: Lukas Schaefer --- lib/Service/GoogleDriveAPIService.php | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/lib/Service/GoogleDriveAPIService.php b/lib/Service/GoogleDriveAPIService.php index 30aacf34..b504ab6a 100644 --- a/lib/Service/GoogleDriveAPIService.php +++ b/lib/Service/GoogleDriveAPIService.php @@ -253,6 +253,7 @@ public function importFiles( string $userId, string $targetPath, string $targetSharedPath, ?int $maxDownloadSize = null, array &$directoryProgress = [], ): array { + $rootSharedWithMeImportFolder = null; $considerSharedFiles = $this->userConfig->getValueString($userId, APPLICATION::APP_ID, 'consider_shared_files', '0', lazy:true) === '1'; // create root folder(s) @@ -892,7 +893,7 @@ private function retrieveFiles(string $userId, string $dirId, string $query, boo } if (!isset($saveFolder)) { - if ($dirId === 'sharedRoot') { + if ($dirId === 'sharedRoot' && $rootSharedWithMeImportFolder !== null) { $saveFolder = $rootSharedWithMeImportFolder; } else { $saveFolder = $rootImportFolder;