Skip to content

Commit

Permalink
Fix chunk file move
Browse files Browse the repository at this point in the history
  • Loading branch information
DeepDiver1975 committed Apr 12, 2016
1 parent 629bc18 commit bb2e68f
Showing 1 changed file with 9 additions and 1 deletion.
10 changes: 9 additions & 1 deletion apps/dav/lib/connector/sabre/filesplugin.php
Original file line number Diff line number Diff line change
Expand Up @@ -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';
Expand Down Expand Up @@ -146,11 +148,17 @@ public function initialize(\Sabre\DAV\Server $server) {

/**
* 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);

Expand Down

0 comments on commit bb2e68f

Please sign in to comment.