summaryrefslogtreecommitdiffstats
path: root/apps/dav/lib
diff options
context:
space:
mode:
authorThomas Müller <thomas.mueller@tmit.eu>2016-04-12 14:26:42 +0200
committerThomas Müller <thomas.mueller@tmit.eu>2016-04-12 14:26:42 +0200
commitbb2e68f72b439df797faabfe422339b9cc6f3cf4 (patch)
tree8f892e892c48b83102206843800d8bbb06fd83b8 /apps/dav/lib
parent629bc1812ee9def6ed78418d3d203a827e95f1d2 (diff)
downloadnextcloud-server-bb2e68f72b439df797faabfe422339b9cc6f3cf4.tar.gz
nextcloud-server-bb2e68f72b439df797faabfe422339b9cc6f3cf4.zip
Fix chunk file move
Diffstat (limited to 'apps/dav/lib')
-rw-r--r--apps/dav/lib/connector/sabre/filesplugin.php10
1 files changed, 9 insertions, 1 deletions
diff --git a/apps/dav/lib/connector/sabre/filesplugin.php b/apps/dav/lib/connector/sabre/filesplugin.php
index 8b54291793a..b74fa7063be 100644
--- a/apps/dav/lib/connector/sabre/filesplugin.php
+++ b/apps/dav/lib/connector/sabre/filesplugin.php
@@ -28,17 +28,19 @@
namespace OCA\DAV\Connector\Sabre;
use OC\Files\View;
+use OCA\DAV\Upload\FutureFile;
use Sabre\DAV\Exception\Forbidden;
use Sabre\DAV\Exception\NotFound;
use Sabre\DAV\IFile;
use \Sabre\DAV\PropFind;
use \Sabre\DAV\PropPatch;
+use Sabre\DAV\ServerPlugin;
use Sabre\DAV\Tree;
use \Sabre\HTTP\RequestInterface;
use \Sabre\HTTP\ResponseInterface;
use OCP\Files\StorageNotAvailableException;
-class FilesPlugin extends \Sabre\DAV\ServerPlugin {
+class FilesPlugin extends ServerPlugin {
// namespace
const NS_OWNCLOUD = 'http://owncloud.org/ns';
@@ -146,11 +148,17 @@ class FilesPlugin extends \Sabre\DAV\ServerPlugin {
/**
* Plugin that checks if a move can actually be performed.
+ *
* @param string $source source path
* @param string $destination destination path
* @throws Forbidden
+ * @throws NotFound
*/
function checkMove($source, $destination) {
+ $sourceNode = $this->server->tree->getNodeForPath($source);
+ if ($sourceNode instanceof FutureFile) {
+ return;
+ }
list($sourceDir,) = \Sabre\HTTP\URLUtil::splitPath($source);
list($destinationDir,) = \Sabre\HTTP\URLUtil::splitPath($destination);