mirror of
https://codeberg.org/icewind/SMB.git
synced 2026-06-03 17:24:07 +02:00
minor cleanup
This commit is contained in:
parent
f3a93465c8
commit
569fcfd875
3 changed files with 2 additions and 2 deletions
|
|
@ -35,6 +35,7 @@ class Connection extends RawConnection {
|
||||||
}
|
}
|
||||||
|
|
||||||
public function clearTillPrompt() {
|
public function clearTillPrompt() {
|
||||||
|
$this->write('');
|
||||||
do {
|
do {
|
||||||
$promptLine = $this->readLine();
|
$promptLine = $this->readLine();
|
||||||
} while (!$this->isPrompt($promptLine));
|
} while (!$this->isPrompt($promptLine));
|
||||||
|
|
|
||||||
|
|
@ -72,7 +72,6 @@ class Share extends AbstractShare {
|
||||||
if (!$connection->isValid()) {
|
if (!$connection->isValid()) {
|
||||||
throw new ConnectionException($connection->readLine());
|
throw new ConnectionException($connection->readLine());
|
||||||
}
|
}
|
||||||
$connection->write('');
|
|
||||||
// some versions of smbclient add a help message in first of the first prompt
|
// some versions of smbclient add a help message in first of the first prompt
|
||||||
$connection->clearTillPrompt();
|
$connection->clearTillPrompt();
|
||||||
return $connection;
|
return $connection;
|
||||||
|
|
|
||||||
|
|
@ -24,7 +24,7 @@ class Share extends AbstractShare {
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @expectedException \Icewind\SMB\Exception\InvalidHostException
|
* @expectedException \Icewind\SMB\Exception\ConnectException
|
||||||
*/
|
*/
|
||||||
public function testHostEscape() {
|
public function testHostEscape() {
|
||||||
$this->requireBackendEnv('smbclient');
|
$this->requireBackendEnv('smbclient');
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue