[Pkg-owncloud-commits] [owncloud] 03/59: The file providing the sftp:// scheme needs to be included manually.

David Prévot taffit at moszumanska.debian.org
Fri Jul 18 16:19:24 UTC 2014


This is an automated email from the git hooks/post-receive script.

taffit pushed a commit to branch master
in repository owncloud.

commit fae2a009221b71c8a71cffd17e8ff6628452ffb8
Author: Andreas Fischer <bantu at owncloud.com>
Date:   Sat Jul 12 13:57:27 2014 +0200

    The file providing the sftp:// scheme needs to be included manually.
---
 apps/files_external/lib/sftp.php | 11 +++++++++++
 1 file changed, 11 insertions(+)

diff --git a/apps/files_external/lib/sftp.php b/apps/files_external/lib/sftp.php
index 52cac9b..804f418 100644
--- a/apps/files_external/lib/sftp.php
+++ b/apps/files_external/lib/sftp.php
@@ -18,6 +18,17 @@ class SFTP extends \OC\Files\Storage\Common {
 	private static $tempFiles = array();
 
 	public function __construct($params) {
+		// The sftp:// scheme has to be manually registered via inclusion of
+		// the 'Net/SFTP/Stream.php' file which registers the Net_SFTP_Stream
+		// stream wrapper as a side effect.
+		// A slightly better way to register the stream wrapper is available
+		// since phpseclib 0.3.7 in the form of a static call to
+		// Net_SFTP_Stream::register() which will trigger autoloading if
+		// necessary.
+		// TODO: Call Net_SFTP_Stream::register() instead when phpseclib is
+		//       updated to 0.3.7 or higher.
+		require_once 'Net/SFTP/Stream.php';
+
 		$this->host = $params['host'];
 		$proto = strpos($this->host, '://');
 		if ($proto != false) {

-- 
Alioth's /usr/local/bin/git-commit-notice on /srv/git.debian.org/git/pkg-owncloud/owncloud.git



More information about the Pkg-owncloud-commits mailing list