mirror of
https://codeberg.org/icewind/SMB.git
synced 2026-06-04 01:34:07 +02:00
handle smbclient help message
This commit is contained in:
parent
c97dee758e
commit
0ef64a9156
2 changed files with 12 additions and 0 deletions
|
|
@ -72,6 +72,9 @@ 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;
|
||||
}
|
||||
|
||||
|
|
@ -125,6 +128,7 @@ class Share extends AbstractShare {
|
|||
//check output for errors
|
||||
$this->parseOutput($output, $path);
|
||||
$output = $this->execute('dir');
|
||||
|
||||
$this->execute('cd /');
|
||||
|
||||
return $this->parser->parseDir($output, $path);
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue