Skip to content

Commit b630b5b

Browse files
authored
Merge pull request #313 from nextcloud/undefined_variable
fix: undefined variable rootSharedWithMeImportFolder
2 parents c939ba4 + 0e914b0 commit b630b5b

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)