minor cleanup

This commit is contained in:
Robin Appelman 2018-01-18 13:25:37 +01:00
commit 569fcfd875
3 changed files with 2 additions and 2 deletions

View file

@ -35,6 +35,7 @@ class Connection extends RawConnection {
}
public function clearTillPrompt() {
$this->write('');
do {
$promptLine = $this->readLine();
} while (!$this->isPrompt($promptLine));

View file

@ -72,7 +72,6 @@ class Share extends AbstractShare {
if (!$connection->isValid()) {
throw new ConnectionException($connection->readLine());
}
$connection->write('');
// some versions of smbclient add a help message in first of the first prompt
$connection->clearTillPrompt();
return $connection;

View file

@ -24,7 +24,7 @@ class Share extends AbstractShare {
}
/**
* @expectedException \Icewind\SMB\Exception\InvalidHostException
* @expectedException \Icewind\SMB\Exception\ConnectException
*/
public function testHostEscape() {
$this->requireBackendEnv('smbclient');