Merge branch '1.0' into 2.0

This commit is contained in:
terrafrost 2024-05-17 17:01:33 -05:00
commit afda7ebf95

View File

@ -758,7 +758,8 @@ class SFTP extends SSH2
return false;
}
$this->canonicalize_paths = false;
$this->_reset_connection(NET_SSH2_DISCONNECT_CONNECTION_LOST);
$this->_reset_sftp();
return $this->_init_sftp_connection();
}
$this->_update_stat_cache($this->pwd, array());
@ -3628,6 +3629,19 @@ class SFTP extends SSH2
return $result;
}
/**
* Resets the SFTP channel for re-use
*
* @access private
*/
function _reset_sftp()
{
$this->use_request_id = false;
$this->pwd = false;
$this->requestBuffer = [];
$this->partial_init = false;
}
/**
* Resets a connection for re-use
*
@ -3637,10 +3651,7 @@ class SFTP extends SSH2
function _reset_connection($reason)
{
parent::_reset_connection($reason);
$this->use_request_id = false;
$this->pwd = false;
$this->requestBuffer = array();
$this->partial_init = false;
$this->_reset_sftp();
}
/**