summaryrefslogtreecommitdiffstats
path: root/3rdparty/smb4php/smb.php
diff options
context:
space:
mode:
authorRobin Appelman <icewind@owncloud.com>2012-06-17 02:42:40 +0200
committerRobin Appelman <icewind@owncloud.com>2012-07-10 14:21:50 +0200
commitb8a6ffe261268603f2ed8e0c1cd91969ea6a1863 (patch)
tree0c3f9ddc972a935974e00a00fa9292d328af9db2 /3rdparty/smb4php/smb.php
parent7f57591ef1e2a7528752674595a32b35cfce4cd3 (diff)
downloadnextcloud-server-b8a6ffe261268603f2ed8e0c1cd91969ea6a1863.tar.gz
nextcloud-server-b8a6ffe261268603f2ed8e0c1cd91969ea6a1863.zip
fix statcache for filenames containing non-alphanumeric characters in smb streamwrapper
Diffstat (limited to '3rdparty/smb4php/smb.php')
-rw-r--r--3rdparty/smb4php/smb.php5
1 files changed, 4 insertions, 1 deletions
diff --git a/3rdparty/smb4php/smb.php b/3rdparty/smb4php/smb.php
index 69fb2487bc0..12c5890723b 100644
--- a/3rdparty/smb4php/smb.php
+++ b/3rdparty/smb4php/smb.php
@@ -326,8 +326,11 @@ class smb_stream_wrapper extends smb {
$this->dir = array_keys($o['info']);
$this->dir_index = 0;
$this->adddircache ($url, $this->dir);
+ if(substr($url,-1,1)=='/'){
+ $url=substr($url,0,-1);
+ }
foreach ($o['info'] as $name => $info) {
- smb::addstatcache($url . '/' . urlencode($name), $info);
+ smb::addstatcache($url . '/' . $name, $info);
}
} else {
trigger_error ("dir_opendir(): dir failed for path '".$pu['path']."'", E_USER_WARNING);