return the correct result when doing an smb rename
This commit is contained in:
parent
ea6115bfaa
commit
ea566868a8
|
@ -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) {
|
||||
|
|
|
@ -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);
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue