summaryrefslogtreecommitdiffstats
path: root/apps/files_external/lib/webdav.php
diff options
context:
space:
mode:
Diffstat (limited to 'apps/files_external/lib/webdav.php')
-rw-r--r--apps/files_external/lib/webdav.php6
1 files changed, 3 insertions, 3 deletions
diff --git a/apps/files_external/lib/webdav.php b/apps/files_external/lib/webdav.php
index f98be318f1c..66920fc9f64 100644
--- a/apps/files_external/lib/webdav.php
+++ b/apps/files_external/lib/webdav.php
@@ -171,7 +171,7 @@ class DAV extends \OC\Files\Storage\Common{
$curl = curl_init();
$fp = fopen('php://temp', 'r+');
curl_setopt($curl, CURLOPT_USERPWD, $this->user.':'.$this->password);
- curl_setopt($curl, CURLOPT_URL, $this->createBaseUri().$path);
+ curl_setopt($curl, CURLOPT_URL, $this->createBaseUri().str_replace(' ', '%20', $path));
curl_setopt($curl, CURLOPT_FILE, $fp);
curl_setopt($curl, CURLOPT_FOLLOWLOCATION, true);
@@ -225,7 +225,7 @@ class DAV extends \OC\Files\Storage\Common{
return 0;
}
} catch(\Exception $e) {
- return \OC\Files\FREE_SPACE_UNKNOWN;
+ return \OC\Files\SPACE_UNKNOWN;
}
}
@@ -256,7 +256,7 @@ class DAV extends \OC\Files\Storage\Common{
$curl = curl_init();
curl_setopt($curl, CURLOPT_USERPWD, $this->user.':'.$this->password);
- curl_setopt($curl, CURLOPT_URL, $this->createBaseUri().$target);
+ curl_setopt($curl, CURLOPT_URL, $this->createBaseUri().str_replace(' ', '%20', $target));
curl_setopt($curl, CURLOPT_BINARYTRANSFER, true);
curl_setopt($curl, CURLOPT_INFILE, $source); // file pointer
curl_setopt($curl, CURLOPT_INFILESIZE, filesize($path));