aboutsummaryrefslogtreecommitdiffstats
path: root/apps/dav
diff options
context:
space:
mode:
authorVincent Petry <pvince81@owncloud.com>2017-03-29 17:01:04 +0200
committerJoas Schilling <coding@schilljs.com>2017-04-26 15:43:01 +0200
commitec8d7010e54138f87a5c17216b6863188db136a4 (patch)
tree70de1bede994880970bc2e2536d6377d6c4f67f3 /apps/dav
parent642b4331a6c0aec3a6a7d0350f3582df7caafc6b (diff)
downloadnextcloud-server-ec8d7010e54138f87a5c17216b6863188db136a4.tar.gz
nextcloud-server-ec8d7010e54138f87a5c17216b6863188db136a4.zip
Accept moving FutureFile into a Directory
Diffstat (limited to 'apps/dav')
-rw-r--r--apps/dav/lib/Connector/Sabre/Directory.php6
1 files changed, 6 insertions, 0 deletions
diff --git a/apps/dav/lib/Connector/Sabre/Directory.php b/apps/dav/lib/Connector/Sabre/Directory.php
index a26420344d0..ddf324ce851 100644
--- a/apps/dav/lib/Connector/Sabre/Directory.php
+++ b/apps/dav/lib/Connector/Sabre/Directory.php
@@ -43,6 +43,7 @@ use Sabre\DAV\Exception\ServiceUnavailable;
use Sabre\DAV\INode;
use Sabre\DAV\Exception\BadRequest;
use OC\Files\Mount\MoveableMount;
+use Sabre\DAV\IFile;
class Directory extends \OCA\DAV\Connector\Sabre\Node
implements \Sabre\DAV\ICollection, \Sabre\DAV\IQuota, \Sabre\DAV\IMoveTarget {
@@ -344,6 +345,11 @@ class Directory extends \OCA\DAV\Connector\Sabre\Node
*/
public function moveInto($targetName, $fullSourcePath, INode $sourceNode) {
if (!$sourceNode instanceof Node) {
+ // it's a file of another kind, like FutureFile
+ if ($sourceNode instanceof IFile) {
+ // fallback to default copy+delete handling
+ return false;
+ }
throw new BadRequest('Incompatible node types');
}