]> source.dussan.org Git - nextcloud-server.git/commitdiff
Fixed move operation to pass the whole URL as expected
authorVincent Petry <pvince81@owncloud.com>
Wed, 20 Nov 2013 17:59:02 +0000 (18:59 +0100)
committerVincent Petry <pvince81@owncloud.com>
Wed, 20 Nov 2013 17:59:02 +0000 (18:59 +0100)
The MOVE and COPY spec expect the "Destination" header to receive the
full URL, not only the root.

Fixes #5942

apps/files_external/lib/webdav.php

index 66920fc9f6465ab093b3b45dceff3d7443019371..9ee7f5552853c991539901520a26ac1cf71d8644 100644 (file)
@@ -268,7 +268,7 @@ class DAV extends \OC\Files\Storage\Common{
        public function rename($path1, $path2) {
                $this->init();
                $path1=$this->cleanPath($path1);
-               $path2=$this->root.$this->cleanPath($path2);
+               $path2=$this->createBaseUri().$this->cleanPath($path2);
                try {
                        $this->client->request('MOVE', $path1, null, array('Destination'=>$path2));
                        return true;
@@ -280,7 +280,7 @@ class DAV extends \OC\Files\Storage\Common{
        public function copy($path1, $path2) {
                $this->init();
                $path1=$this->cleanPath($path1);
-               $path2=$this->root.$this->cleanPath($path2);
+               $path2=$this->createBaseUri().$this->cleanPath($path2);
                try {
                        $this->client->request('COPY', $path1, null, array('Destination'=>$path2));
                        return true;