Skip to content

Commit 0e914b0

Browse files
committed
fix: undefined variable rootSharedWithMeImportFolder
Signed-off-by: Lukas Schaefer <lukas@lschaefer.xyz>
1 parent e04484d commit 0e914b0

1 file changed

Lines changed: 2 additions & 1 deletion

File tree

lib/Service/GoogleDriveAPIService.php

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -253,6 +253,7 @@ public function importFiles(
253253
string $userId, string $targetPath, string $targetSharedPath,
254254
?int $maxDownloadSize = null, array &$directoryProgress = [],
255255
): array {
256+
$rootSharedWithMeImportFolder = null;
256257
$considerSharedFiles = $this->userConfig->getValueString($userId, APPLICATION::APP_ID, 'consider_shared_files', '0', lazy:true) === '1';
257258

258259
// create root folder(s)
@@ -892,7 +893,7 @@ private function retrieveFiles(string $userId, string $dirId, string $query, boo
892893
}
893894

894895
if (!isset($saveFolder)) {
895-
if ($dirId === 'sharedRoot') {
896+
if ($dirId === 'sharedRoot' && $rootSharedWithMeImportFolder !== null) {
896897
$saveFolder = $rootSharedWithMeImportFolder;
897898
} else {
898899
$saveFolder = $rootImportFolder;

0 commit comments

Comments
 (0)