Merge pull request #9124 from owncloud/move-permissions

Fix moving files into read only public shares
This commit is contained in:
Vincent Petry 2014-06-23 17:05:35 +02:00
commit 536a190846

View file

@ -209,8 +209,14 @@ class DAV extends \OC\Files\Storage\Common {
$ext = '';
}
if ($this->file_exists($path)) {
if (!$this->isUpdatable($path)) {
return false;
}
$tmpFile = $this->getCachedFile($path);
} else {
if (!$this->isCreatable(dirname($path))) {
return false;
}
$tmpFile = \OCP\Files::tmpFile($ext);
}
\OC\Files\Stream\Close::registerCallback($tmpFile, array($this, 'writeBack'));