diff options
author | Morris Jobke <hey@morrisjobke.de> | 2015-02-27 17:11:37 +0100 |
---|---|---|
committer | Morris Jobke <hey@morrisjobke.de> | 2015-02-27 17:11:37 +0100 |
commit | b4dfd043d7eef8767cf6727cb0651851b8139da7 (patch) | |
tree | 668d565b94d2c9e3109d253abcfc2423707240c1 /tests | |
parent | 970b14d2979cb03d1e9ba96cbce3e43a52835333 (diff) | |
parent | fc027bceb7309fd2f2b6e30cb781d700076669cd (diff) | |
download | nextcloud-server-b4dfd043d7eef8767cf6727cb0651851b8139da7.tar.gz nextcloud-server-b4dfd043d7eef8767cf6727cb0651851b8139da7.zip |
Merge pull request #14575 from owncloud/cache-rename-overwrite
Fix cache update when doing a rename that overwrites the target
Diffstat (limited to 'tests')
-rw-r--r-- | tests/lib/files/view.php | 13 |
1 files changed, 13 insertions, 0 deletions
diff --git a/tests/lib/files/view.php b/tests/lib/files/view.php index 0d88ec1d66a..db39df7d16b 100644 --- a/tests/lib/files/view.php +++ b/tests/lib/files/view.php @@ -962,4 +962,17 @@ class View extends \Test\TestCase { public function testConstructDirectoryTraversalException($root) { new \OC\Files\View($root); } + + public function testRenameOverWrite() { + $storage = new Temporary(array()); + $scanner = $storage->getScanner(); + $storage->mkdir('sub'); + $storage->mkdir('foo'); + $storage->file_put_contents('foo.txt', 'asd'); + $storage->file_put_contents('foo/bar.txt', 'asd'); + $scanner->scan(''); + \OC\Files\Filesystem::mount($storage, array(), '/test/'); + $view = new \OC\Files\View(''); + $this->assertTrue($view->rename('/test/foo.txt', '/test/foo/bar.txt')); + } } |