[Pkg-owncloud-commits] [owncloud] 196/394: [3rdparty] patching smb4php to allow special characters on file names within SMB shares
David Prévot
taffit at alioth.debian.org
Fri Nov 8 23:12:03 UTC 2013
This is an automated email from the git hooks/post-receive script.
taffit pushed a commit to annotated tag v4.5.10
in repository owncloud.
commit f417741ac9a50b6f3934a8d90b9a69df70659f58
Author: Thomas Mueller <thomas.mueller at tmit.eu>
Date: Thu Dec 6 23:34:05 2012 +0100
[3rdparty] patching smb4php to allow special characters on file names within SMB shares
---
3rdparty/smb4php/smb.php | 12 ++++++++++++
1 file changed, 12 insertions(+)
diff --git a/3rdparty/smb4php/smb.php b/3rdparty/smb4php/smb.php
index c080c1b..6222563 100644
--- a/3rdparty/smb4php/smb.php
+++ b/3rdparty/smb4php/smb.php
@@ -112,6 +112,10 @@ class smb {
}
$port = ($purl['port'] <> 139 ? ' -p ' . escapeshellarg ($purl['port']) : '');
$options = '-O ' . escapeshellarg(SMB4PHP_SMBOPTIONS);
+
+ // this put env is necessary to read the output of smbclient correctly
+ $old_locale = getenv('LC_ALL');
+ putenv('LC_ALL=en_US.UTF-8');
$output = popen (SMB4PHP_SMBCLIENT." -N {$auth} {$options} {$port} {$options} {$params} 2>/dev/null", 'r');
$info = array ();
$info['info']= array ();
@@ -180,6 +184,14 @@ class smb {
}
}
pclose($output);
+
+ // restore previous locale
+ if ($old_locale===false) {
+ putenv('LC_ALL');
+ } else {
+ putenv('LC_ALL='.$old_locale);
+ }
+
return $info;
}
--
Alioth's /usr/local/bin/git-commit-notice on /srv/git.debian.org/git/pkg-owncloud/owncloud.git
More information about the Pkg-owncloud-commits
mailing list