]> source.dussan.org Git - nextcloud-server.git/commitdiff
Prevent errors on broken SFTP config
authorRobin McCorkell <rmccorkell@karoshi.org.uk>
Wed, 27 Aug 2014 08:02:14 +0000 (09:02 +0100)
committerRobin McCorkell <rmccorkell@karoshi.org.uk>
Wed, 27 Aug 2014 08:02:14 +0000 (09:02 +0100)
apps/files_external/lib/sftp.php

index e0655cc8d3db5717e86a505be1f693c43b7622ec..aec56d088d56fda50fd99d7f769a842a26ed65c4 100644 (file)
@@ -166,6 +166,9 @@ class SFTP extends \OC\Files\Storage\Common {
        public function opendir($path) {
                try {
                        $list = $this->client->nlist($this->absPath($path));
+                       if ($list === false) {
+                               return false;
+                       }
 
                        $id = md5('sftp:' . $path);
                        $dirStream = array();