Added rawurlencode for other params in GDrive storage

This commit is contained in:
Vincent Petry 2015-03-26 13:57:28 +01:00
parent 43588fe2f7
commit 534892d456
1 changed files with 2 additions and 2 deletions

View File

@ -103,7 +103,7 @@ class Google extends \OC\Files\Storage\Common {
if (isset($this->driveFiles[$path])) {
$parentId = $this->driveFiles[$path]->getId();
} 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();
if (!empty($result)) {
// Google Drive allows files with the same name, ownCloud doesn't
@ -247,7 +247,7 @@ class Google extends \OC\Files\Storage\Common {
if ($pageToken !== true) {
$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);
foreach ($children->getItems() as $child) {
$name = $child->getTitle();