summaryrefslogtreecommitdiffstats
path: root/apps/files_external
diff options
context:
space:
mode:
authorVincent Petry <pvince81@owncloud.com>2015-03-26 12:15:02 +0100
committerLukas Reschke <lukas@owncloud.com>2015-03-31 15:14:03 +0200
commit5c9998179fa236a4863b467d0aff56fc9f67cceb (patch)
tree400e4718028d8c56b1177b4d614833f041396c3c /apps/files_external
parent691c353eeda077be0fcca1e3839265815a650a90 (diff)
downloadnextcloud-server-5c9998179fa236a4863b467d0aff56fc9f67cceb.tar.gz
nextcloud-server-5c9998179fa236a4863b467d0aff56fc9f67cceb.zip
Properly quote file names in listFiles query for GDrive
Diffstat (limited to 'apps/files_external')
-rw-r--r--apps/files_external/lib/google.php2
1 files changed, 1 insertions, 1 deletions
diff --git a/apps/files_external/lib/google.php b/apps/files_external/lib/google.php
index 291f9364ddd..860a775c5eb 100644
--- a/apps/files_external/lib/google.php
+++ b/apps/files_external/lib/google.php
@@ -113,7 +113,7 @@ class Google extends \OC\Files\Storage\Common {
if (isset($this->driveFiles[$path])) {
$parentId = $this->driveFiles[$path]->getId();
} else {
- $q = "title='".$name."' and '".$parentId."' in parents and trashed = false";
+ $q = "title='".rawurlencode($name)."' and '".$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