Accept moving FutureFile into a Directory
This commit is contained in:
parent
642b4331a6
commit
ec8d7010e5
|
@ -43,6 +43,7 @@ use Sabre\DAV\Exception\ServiceUnavailable;
|
||||||
use Sabre\DAV\INode;
|
use Sabre\DAV\INode;
|
||||||
use Sabre\DAV\Exception\BadRequest;
|
use Sabre\DAV\Exception\BadRequest;
|
||||||
use OC\Files\Mount\MoveableMount;
|
use OC\Files\Mount\MoveableMount;
|
||||||
|
use Sabre\DAV\IFile;
|
||||||
|
|
||||||
class Directory extends \OCA\DAV\Connector\Sabre\Node
|
class Directory extends \OCA\DAV\Connector\Sabre\Node
|
||||||
implements \Sabre\DAV\ICollection, \Sabre\DAV\IQuota, \Sabre\DAV\IMoveTarget {
|
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) {
|
public function moveInto($targetName, $fullSourcePath, INode $sourceNode) {
|
||||||
if (!$sourceNode instanceof Node) {
|
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');
|
throw new BadRequest('Incompatible node types');
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue