summaryrefslogtreecommitdiffstats
path: root/apps/files_external/lib/smb.php
diff options
context:
space:
mode:
authorRobin Appelman <icewind@owncloud.com>2012-11-07 17:18:56 +0100
committerRobin Appelman <icewind@owncloud.com>2012-11-07 17:18:56 +0100
commit961ff01a93dd69cb12196a1b8507cce925e74fbc (patch)
tree4956c9a42d6286b0851ca73641439e5c002f6a9a /apps/files_external/lib/smb.php
parent4b940955ddb3266f625eae83da412a655efef319 (diff)
parent5cad2d7ccc3d2b4ccd9e1b090e28787f1c28b6ca (diff)
downloadnextcloud-server-961ff01a93dd69cb12196a1b8507cce925e74fbc.tar.gz
nextcloud-server-961ff01a93dd69cb12196a1b8507cce925e74fbc.zip
merge master into filesystem
Diffstat (limited to 'apps/files_external/lib/smb.php')
-rw-r--r--apps/files_external/lib/smb.php12
1 files changed, 5 insertions, 7 deletions
diff --git a/apps/files_external/lib/smb.php b/apps/files_external/lib/smb.php
index 4382f630031..bf0d780d27b 100644
--- a/apps/files_external/lib/smb.php
+++ b/apps/files_external/lib/smb.php
@@ -26,30 +26,28 @@ class SMB extends \OC\Files\Storage\StreamWrapper{
if(!$this->root || $this->root[0]!='/') {
$this->root='/'.$this->root;
}
- if(substr($this->root,-1,1)!='/') {
+ if(substr($this->root, -1, 1)!='/') {
$this->root.='/';
}
if(!$this->share || $this->share[0]!='/') {
$this->share='/'.$this->share;
}
- if(substr($this->share,-1,1)=='/') {
- $this->share=substr($this->share,0,-1);
+ if(substr($this->share, -1, 1)=='/') {
+ $this->share = substr($this->share,0,-1);
}
- }
public function getId(){
return 'smb::' . $this->user . '@' . $this->host . '/' . $this->share . '/' . $this->root;
}
public function constructUrl($path) {
- if(substr($path,-1)=='/') {
- $path=substr($path,0,-1);
+ if(substr($path, -1)=='/') {
+ $path=substr($path, 0, -1);
}
return 'smb://'.$this->user.':'.$this->password.'@'.$this->host.$this->share.$this->root.$path;
}
public function stat($path) {
- $this->init();
if(!$path and $this->root=='/') {//mtime doesn't work for shares
$mtime=$this->shareMTime();
$stat=stat($this->constructUrl($path));