$cache = $storage->getCache();
- Filesystem::mount($storage, [], '/' . $this->user . '/files');
+ Filesystem::mount($storage, [], '/' . $this->user);
+ $storage->mkdir('files');
$this->userView->file_put_contents('test.txt', 'foo');
- $this->assertTrue($storage->file_exists('test.txt'));
+ $this->assertTrue($storage->file_exists('files/test.txt'));
$this->assertFalse($this->userView->unlink('test.txt'));
- $this->assertTrue($storage->file_exists('test.txt'));
- $this->assertTrue($cache->inCache('test.txt'));
+ $this->assertTrue($storage->file_exists('files/test.txt'));
+ $this->assertTrue($cache->inCache('files/test.txt'));
// file should not be in the trashbin
$results = $this->rootView->getDirectoryContent($this->user . '/files_trashbin/files/');
$result = $this->copyFromStorage($sourceStorage, $sourceInternalPath, $targetInternalPath, true);
if ($result) {
if ($sourceStorage->is_dir($sourceInternalPath)) {
- $sourceStorage->rmdir($sourceInternalPath);
+ $result &= $sourceStorage->rmdir($sourceInternalPath);
} else {
- $sourceStorage->unlink($sourceInternalPath);
+ $result &= $sourceStorage->unlink($sourceInternalPath);
}
}
return $result;