mirror of
https://codeberg.org/icewind/SMB.git
synced 2026-06-04 01:34:07 +02:00
handle invalid handles in Share->get
This commit is contained in:
parent
d8105d7695
commit
1fb6581c8d
4 changed files with 45 additions and 1 deletions
|
|
@ -11,6 +11,7 @@ use Icewind\SMB\Exception\AccessDeniedException;
|
|||
use Icewind\SMB\Exception\AlreadyExistsException;
|
||||
use Icewind\SMB\Exception\Exception;
|
||||
use Icewind\SMB\Exception\FileInUseException;
|
||||
use Icewind\SMB\Exception\InvalidResourceException;
|
||||
use Icewind\SMB\Exception\InvalidTypeException;
|
||||
use Icewind\SMB\Exception\NotEmptyException;
|
||||
use Icewind\SMB\Exception\NotFoundException;
|
||||
|
|
@ -42,6 +43,13 @@ class Parser {
|
|||
$error = $part;
|
||||
}
|
||||
}
|
||||
|
||||
$notFoundMsg = 'Error opening local file ';
|
||||
if (substr($output[0], 0, strlen($notFoundMsg)) === $notFoundMsg) {
|
||||
$localPath = substr($output[0], strlen($notFoundMsg));
|
||||
throw new InvalidResourceException('Failed opening local file "' . $localPath . '" for writing');
|
||||
}
|
||||
|
||||
switch ($error) {
|
||||
case ErrorCodes::PathNotFound:
|
||||
case ErrorCodes::ObjectNotFound:
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue