diff options
author | Robin Appelman <icewind@owncloud.com> | 2015-01-26 17:48:28 +0100 |
---|---|---|
committer | Robin Appelman <icewind@owncloud.com> | 2015-01-29 12:47:12 +0100 |
commit | 05035ef4af2222f67bb10e26f096e7eab04dfc17 (patch) | |
tree | 193a560b4781b2af0e3dd12dc18a597ce52485a6 /lib/private/connector/sabre/file.php | |
parent | ddee63fa00e13e1830aa4b6113d30f24b3b34535 (diff) | |
download | nextcloud-server-05035ef4af2222f67bb10e26f096e7eab04dfc17.tar.gz nextcloud-server-05035ef4af2222f67bb10e26f096e7eab04dfc17.zip |
Fix webdav put for single file webdav shares
Diffstat (limited to 'lib/private/connector/sabre/file.php')
-rw-r--r-- | lib/private/connector/sabre/file.php | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/lib/private/connector/sabre/file.php b/lib/private/connector/sabre/file.php index 0f5a3315f8f..12ce633838f 100644 --- a/lib/private/connector/sabre/file.php +++ b/lib/private/connector/sabre/file.php @@ -64,7 +64,7 @@ class OC_Connector_Sabre_File extends OC_Connector_Sabre_Node implements \Sabre\ throw new \Sabre\DAV\Exception\ServiceUnavailable("Encryption is disabled"); } - $fileName = basename($this->path); + $fileName = basename($this->info->getPath()); if (!\OCP\Util::isValidFileName($fileName)) { throw new \Sabre\DAV\Exception\BadRequest(); } @@ -74,8 +74,8 @@ class OC_Connector_Sabre_File extends OC_Connector_Sabre_Node implements \Sabre\ return $this->createFileChunked($data); } - list($storage, ) = $this->fileView->resolvePath($this->path); - $needsPartFile = $this->needsPartFile($storage); + list($storage,) = $this->fileView->resolvePath($this->path); + $needsPartFile = $this->needsPartFile($storage) && (strlen($this->path) > 1); if ($needsPartFile) { // mark file as partial while uploading (ignored by the scanner) |