Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/nextcloud/server.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorRobin Appelman <icewind@owncloud.com>2012-06-17 04:42:40 +0400
committerRobin Appelman <icewind@owncloud.com>2012-06-17 04:42:40 +0400
commit5b6229544d03e59085918151abd010f2700b84f2 (patch)
treecc0edcf6b7e23b78a1e8398d934d400a48e7eb4b /3rdparty
parent549541215e41cc42d94ae92f72df423fce1e5a1c (diff)
fix statcache for filenames containing non-alphanumeric characters in smb streamwrapper
Diffstat (limited to '3rdparty')
-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);