return the correct result when doing an smb rename

This commit is contained in:
Robin Appelman 2013-10-01 22:29:33 +02:00
parent ea6115bfaa
commit ea566868a8
2 changed files with 9 additions and 2 deletions

View File

@ -307,7 +307,8 @@ class smb {
trigger_error('rename(): error in URL', E_USER_ERROR);
}
smb::clearstatcache ($url_from);
return smb::execute ('rename "'.$from['path'].'" "'.$to['path'].'"', $to);
$result = smb::execute ('rename "'.$from['path'].'" "'.$to['path'].'"', $to);
return $result !== false;
}
function mkdir ($url, $mode, $options) {

View File

@ -28,4 +28,10 @@ class SMB extends Storage {
\OCP\Files::rmdirr($this->instance->constructUrl(''));
}
}
public function testRenameWithSpaces() {
$this->instance->mkdir('with spaces');
$result = $this->instance->rename('with spaces', 'foo bar');
$this->assertTrue($result);
}
}