summaryrefslogtreecommitdiffstats
path: root/apps/files_external/lib/smb.php
diff options
context:
space:
mode:
authorBjörn Schießle <schiessle@owncloud.com>2013-06-10 12:12:07 +0200
committerBjörn Schießle <schiessle@owncloud.com>2013-06-10 12:12:07 +0200
commit13017ce9e114d84ba9b4ced240e5648447fdfe45 (patch)
tree5a4ae7b311319a239d9c6792cefc879b5558d1cc /apps/files_external/lib/smb.php
parentb25ab94a08ab9ba5e322043ac470d5352d456c71 (diff)
parentdb06b906e50d7d1b7eca28f51db913af1fbc81f1 (diff)
downloadnextcloud-server-13017ce9e114d84ba9b4ced240e5648447fdfe45.tar.gz
nextcloud-server-13017ce9e114d84ba9b4ced240e5648447fdfe45.zip
Merge branch 'master' into files_encryption_check_private_key
Conflicts: settings/ajax/changepassword.php
Diffstat (limited to 'apps/files_external/lib/smb.php')
-rw-r--r--apps/files_external/lib/smb.php14
1 files changed, 12 insertions, 2 deletions
diff --git a/apps/files_external/lib/smb.php b/apps/files_external/lib/smb.php
index 655c3c9a816..81a6c956385 100644
--- a/apps/files_external/lib/smb.php
+++ b/apps/files_external/lib/smb.php
@@ -57,12 +57,22 @@ class SMB extends \OC\Files\Storage\StreamWrapper{
public function stat($path) {
if ( ! $path and $this->root=='/') {//mtime doesn't work for shares
- $mtime=$this->shareMTime();
$stat=stat($this->constructUrl($path));
+ if (empty($stat)) {
+ return false;
+ }
+ $mtime=$this->shareMTime();
$stat['mtime']=$mtime;
return $stat;
} else {
- return stat($this->constructUrl($path));
+ $stat = stat($this->constructUrl($path));
+
+ // smb4php can return an empty array if the connection could not be established
+ if (empty($stat)) {
+ return false;
+ }
+
+ return $stat;
}
}