Merge pull request #22331 from owncloud/dav-nonexisting-part
fix getNodeForPath for non existing part files
This commit is contained in:
commit
248c571c56
|
@ -136,7 +136,7 @@ class ObjectTree extends \Sabre\DAV\Tree {
|
||||||
$mount = $this->fileView->getMount($path);
|
$mount = $this->fileView->getMount($path);
|
||||||
$storage = $mount->getStorage();
|
$storage = $mount->getStorage();
|
||||||
$internalPath = $mount->getInternalPath($absPath);
|
$internalPath = $mount->getInternalPath($absPath);
|
||||||
if ($storage) {
|
if ($storage && $storage->file_exists($internalPath)) {
|
||||||
/**
|
/**
|
||||||
* @var \OC\Files\Storage\Storage $storage
|
* @var \OC\Files\Storage\Storage $storage
|
||||||
*/
|
*/
|
||||||
|
|
|
@ -608,4 +608,10 @@ abstract class Storage extends \Test\TestCase {
|
||||||
$stat = $this->instance->stat('foo.txt');
|
$stat = $this->instance->stat('foo.txt');
|
||||||
$this->assertEquals(6, $stat['size']);
|
$this->assertEquals(6, $stat['size']);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
public function testPartFile() {
|
||||||
|
$this->instance->file_put_contents('bar.txt.part', 'bar');
|
||||||
|
$this->instance->rename('bar.txt.part', 'bar.txt');
|
||||||
|
$this->assertEquals('bar', $this->instance->file_get_contents('bar.txt'));
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue