Added rawurlencode for other params in GDrive storage
This commit is contained in:
parent
5c9998179f
commit
7036309e22
|
@ -113,7 +113,7 @@ class Google extends \OC\Files\Storage\Common {
|
||||||
if (isset($this->driveFiles[$path])) {
|
if (isset($this->driveFiles[$path])) {
|
||||||
$parentId = $this->driveFiles[$path]->getId();
|
$parentId = $this->driveFiles[$path]->getId();
|
||||||
} else {
|
} else {
|
||||||
$q = "title='".rawurlencode($name)."' and '".$parentId."' in parents and trashed = false";
|
$q = "title='" . rawurlencode($name) . "' and '" . rawurlencode($parentId) . "' in parents and trashed = false";
|
||||||
$result = $this->service->files->listFiles(array('q' => $q))->getItems();
|
$result = $this->service->files->listFiles(array('q' => $q))->getItems();
|
||||||
if (!empty($result)) {
|
if (!empty($result)) {
|
||||||
// Google Drive allows files with the same name, ownCloud doesn't
|
// Google Drive allows files with the same name, ownCloud doesn't
|
||||||
|
@ -257,7 +257,7 @@ class Google extends \OC\Files\Storage\Common {
|
||||||
if ($pageToken !== true) {
|
if ($pageToken !== true) {
|
||||||
$params['pageToken'] = $pageToken;
|
$params['pageToken'] = $pageToken;
|
||||||
}
|
}
|
||||||
$params['q'] = "'".$folder->getId()."' in parents and trashed = false";
|
$params['q'] = "'" . rawurlencode($folder->getId()) . "' in parents and trashed = false";
|
||||||
$children = $this->service->files->listFiles($params);
|
$children = $this->service->files->listFiles($params);
|
||||||
foreach ($children->getItems() as $child) {
|
foreach ($children->getItems() as $child) {
|
||||||
$name = $child->getTitle();
|
$name = $child->getTitle();
|
||||||
|
|
Loading…
Reference in New Issue