From dbc7adaa15d7f51688ff885a2aa304d87d815b85 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Manuel=20Rodri=CC=81guez?= Date: Wed, 2 Feb 2022 19:47:52 +0100 Subject: [PATCH] Set root folder for appDataFolder spaces --- src/GoogleDriveAdapter.php | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/GoogleDriveAdapter.php b/src/GoogleDriveAdapter.php index e9b90f0..1778054 100644 --- a/src/GoogleDriveAdapter.php +++ b/src/GoogleDriveAdapter.php @@ -241,12 +241,12 @@ public function __construct($service, $root = null, $options = []) } else { if (!$this->useDisplayPaths || $root === null) { if ($root === null) { - $root = 'root'; + $root = $this->spaces === 'appDataFolder' ? 'appDataFolder' : 'root'; } $this->root = $root; $this->setPathPrefix(''); } else { - $this->root = 'root'; + $this->root = $this->spaces === 'appDataFolder' ? 'appDataFolder' : 'root'; $this->setPathPrefix(''); // get real root id