Skip to content
Snippets Groups Projects
Commit 1d7d5d28 authored by Thomas Müller's avatar Thomas Müller
Browse files

In cases where smb4php returns false of an empty array stat/( has to return false.

Fixes #3466 because the test method of external filesystems uses stat() to detect if the given parameters are okay.

Changes to 3rdparty are necessary as well:
https://github.com/owncloud/3rdparty/pull/33
parent 69886251
No related branches found
No related tags found
No related merge requests found
......@@ -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;
}
}
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment