From 76c63a576089edcd553244f02d8c3f6c28038fd2 Mon Sep 17 00:00:00 2001 From: Robin Appelman Date: Mon, 31 Mar 2014 17:00:32 +0200 Subject: Fix uploading files containing a # in the path for webdav --- apps/files_external/lib/webdav.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'apps/files_external/lib/webdav.php') diff --git a/apps/files_external/lib/webdav.php b/apps/files_external/lib/webdav.php index 279ae716935..f5010f92208 100644 --- a/apps/files_external/lib/webdav.php +++ b/apps/files_external/lib/webdav.php @@ -267,7 +267,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() . str_replace(' ', '%20', $target)); + curl_setopt($curl, CURLOPT_URL, $this->createBaseUri() . $this->encodePath($target)); curl_setopt($curl, CURLOPT_BINARYTRANSFER, true); curl_setopt($curl, CURLOPT_INFILE, $source); // file pointer curl_setopt($curl, CURLOPT_INFILESIZE, filesize($path)); -- cgit v1.2.3