No need to call IMAP EXAMINE when current folder already SELECT

This commit is contained in:
the-djmaze 2022-12-27 11:17:29 +01:00
parent ad45bcf2cf
commit 871664cd39

View file

@ -350,13 +350,12 @@ trait Folders
if (!$bReSelectSameFolders if (!$bReSelectSameFolders
&& $this->oCurrentFolderInfo && $this->oCurrentFolderInfo
&& $sFolderName === $this->oCurrentFolderInfo->FolderName && $sFolderName === $this->oCurrentFolderInfo->FolderName
&& $bIsWritable === $this->oCurrentFolderInfo->IsWritable && ($bIsWritable === $this->oCurrentFolderInfo->IsWritable || $this->oCurrentFolderInfo->IsWritable)
) { ) {
return $this->oCurrentFolderInfo; return $this->oCurrentFolderInfo;
} }
if (!\strlen(\trim($sFolderName))) if (!\strlen(\trim($sFolderName))) {
{
throw new \InvalidArgumentException; throw new \InvalidArgumentException;
} }