diff options
Diffstat (limited to 'apps/files_external/3rdparty/icewind/smb/src/Share.php')
-rw-r--r-- | apps/files_external/3rdparty/icewind/smb/src/Share.php | 11 |
1 files changed, 6 insertions, 5 deletions
diff --git a/apps/files_external/3rdparty/icewind/smb/src/Share.php b/apps/files_external/3rdparty/icewind/smb/src/Share.php index ba8bbbbb8ca..542eaf0887e 100644 --- a/apps/files_external/3rdparty/icewind/smb/src/Share.php +++ b/apps/files_external/3rdparty/icewind/smb/src/Share.php @@ -68,8 +68,9 @@ class Share extends AbstractShare { ); $connection = new Connection($command, $this->parser); $connection->writeAuthentication($this->server->getUser(), $this->server->getPassword()); + $connection->connect(); if (!$connection->isValid()) { - throw new ConnectionException(); + throw new ConnectionException($connection->readLine()); } return $connection; } @@ -88,7 +89,6 @@ class Share extends AbstractShare { protected function reconnect() { $this->connection->reconnect(); - $this->connection->writeAuthentication($this->server->getUser(), $this->server->getPassword()); if (!$this->connection->isValid()) { throw new ConnectionException(); } @@ -318,9 +318,9 @@ class Share extends AbstractShare { $modeString = ''; $modeMap = array( FileInfo::MODE_READONLY => 'r', - FileInfo::MODE_HIDDEN => 'h', - FileInfo::MODE_ARCHIVE => 'a', - FileInfo::MODE_SYSTEM => 's' + FileInfo::MODE_HIDDEN => 'h', + FileInfo::MODE_ARCHIVE => 'a', + FileInfo::MODE_SYSTEM => 's' ); foreach ($modeMap as $modeByte => $string) { if ($mode & $modeByte) { @@ -413,6 +413,7 @@ class Share extends AbstractShare { } $path = str_replace('/', '\\', $path); $path = str_replace('"', '^"', $path); + $path = ltrim($path, '\\'); return '"' . $path . '"'; } |