summaryrefslogtreecommitdiffstats
path: root/apps/files_external
diff options
context:
space:
mode:
authorAndreas Fischer <bantu@owncloud.com>2014-07-12 13:57:27 +0200
committerAndreas Fischer <bantu@owncloud.com>2014-07-12 13:57:27 +0200
commitc8024934c081238db35e2c9332493c08d1e9b402 (patch)
treea41af5fadb3770097c328186aad318d9f8d7258e /apps/files_external
parent8dc3c3ed6af4afb4ddd6e196b97cafcf3245d377 (diff)
downloadnextcloud-server-c8024934c081238db35e2c9332493c08d1e9b402.tar.gz
nextcloud-server-c8024934c081238db35e2c9332493c08d1e9b402.zip
The file providing the sftp:// scheme needs to be included manually.
Diffstat (limited to 'apps/files_external')
-rw-r--r--apps/files_external/lib/sftp.php11
1 files changed, 11 insertions, 0 deletions
diff --git a/apps/files_external/lib/sftp.php b/apps/files_external/lib/sftp.php
index 52cac9bb64a..804f418a455 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) {