diff options
Diffstat (limited to '3rdparty')
-rw-r--r-- | 3rdparty/php-cloudfiles/cloudfiles.php | 4 | ||||
-rw-r--r-- | 3rdparty/smb4php/smb.php | 12 |
2 files changed, 14 insertions, 2 deletions
diff --git a/3rdparty/php-cloudfiles/cloudfiles.php b/3rdparty/php-cloudfiles/cloudfiles.php index 5f7e2100a99..7b1014265e5 100644 --- a/3rdparty/php-cloudfiles/cloudfiles.php +++ b/3rdparty/php-cloudfiles/cloudfiles.php @@ -2000,7 +2000,7 @@ class CF_Object // } //use OC's mimetype detection for files - if(is_file($handle)){ + if(@is_file($handle)){ $this->content_type=OC_Helper::getMimeType($handle); }else{ $this->content_type=OC_Helper::getStringMimeType($handle); @@ -2537,7 +2537,7 @@ class CF_Object } $md5 = hash_final($ctx, false); rewind($data); - } elseif ((string)is_file($data)) { + } elseif ((string)@is_file($data)) { $md5 = md5_file($data); } else { $md5 = md5($data); diff --git a/3rdparty/smb4php/smb.php b/3rdparty/smb4php/smb.php index c50b26b935e..c080c1b590f 100644 --- a/3rdparty/smb4php/smb.php +++ b/3rdparty/smb4php/smb.php @@ -229,6 +229,8 @@ class smb { } function addstatcache ($url, $info) { + $url = str_replace('//', '/', $url); + $url = rtrim($url, '/'); global $__smb_cache; $is_file = (strpos ($info['attr'],'D') === FALSE); $s = ($is_file) ? stat ('/etc/passwd') : stat ('/tmp'); @@ -238,11 +240,15 @@ class smb { } function getstatcache ($url) { + $url = str_replace('//', '/', $url); + $url = rtrim($url, '/'); global $__smb_cache; return isset ($__smb_cache['stat'][$url]) ? $__smb_cache['stat'][$url] : FALSE; } function clearstatcache ($url='') { + $url = str_replace('//', '/', $url); + $url = rtrim($url, '/'); global $__smb_cache; if ($url == '') $__smb_cache['stat'] = array (); else unset ($__smb_cache['stat'][$url]); } @@ -358,16 +364,22 @@ class smb_stream_wrapper extends smb { # cache function adddircache ($url, $content) { + $url = str_replace('//', '/', $url); + $url = rtrim($url, '/'); global $__smb_cache; return $__smb_cache['dir'][$url] = $content; } function getdircache ($url) { + $url = str_replace('//', '/', $url); + $url = rtrim($url, '/'); global $__smb_cache; return isset ($__smb_cache['dir'][$url]) ? $__smb_cache['dir'][$url] : FALSE; } function cleardircache ($url='') { + $url = str_replace('//', '/', $url); + $url = rtrim($url, '/'); global $__smb_cache; if ($url == ''){ $__smb_cache['dir'] = array (); |