update icewind/smb to 2.0.6

Signed-off-by: Robin Appelman <robin@icewind.nl>
This commit is contained in:
Robin Appelman 2019-02-06 17:41:55 +01:00
parent e965465f6b
commit 9652ca64a1
No known key found for this signature in database
GPG Key ID: 42B69D8A64526EFB
9 changed files with 33 additions and 36 deletions

View File

@ -8,7 +8,7 @@
"classmap-authoritative": true
},
"require": {
"icewind/smb": "2.0.5",
"icewind/smb": "2.0.6",
"icewind/streams": "0.5.2"
}
}

View File

@ -1,23 +1,23 @@
{
"_readme": [
"This file locks the dependencies of your project to a known state",
"Read more about it at https://getcomposer.org/doc/01-basic-usage.md#composer-lock-the-lock-file",
"Read more about it at https://getcomposer.org/doc/01-basic-usage.md#installing-dependencies",
"This file is @generated automatically"
],
"content-hash": "eaf0f7c6a692656b30a592fe47024ed4",
"content-hash": "cf703fb9a19415ef20b06e61b2cceb37",
"packages": [
{
"name": "icewind/smb",
"version": "v2.0.5",
"version": "v2.0.6",
"source": {
"type": "git",
"url": "https://github.com/icewind1991/SMB.git",
"reference": "b888dd81bd05532677e1469849d9065011256a33"
"reference": "3cf60dcb567fa62bb8e0358534591d0962ef6fec"
},
"dist": {
"type": "zip",
"url": "https://api.github.com/repos/icewind1991/SMB/zipball/b888dd81bd05532677e1469849d9065011256a33",
"reference": "b888dd81bd05532677e1469849d9065011256a33",
"url": "https://api.github.com/repos/icewind1991/SMB/zipball/3cf60dcb567fa62bb8e0358534591d0962ef6fec",
"reference": "3cf60dcb567fa62bb8e0358534591d0962ef6fec",
"shasum": ""
},
"require": {
@ -45,7 +45,7 @@
}
],
"description": "php wrapper for smbclient and libsmbclient-php",
"time": "2018-03-28T13:51:31+00:00"
"time": "2019-02-06T16:18:34+00:00"
},
{
"name": "icewind/streams",

View File

@ -279,7 +279,7 @@ class ClassLoader
*/
public function setApcuPrefix($apcuPrefix)
{
$this->apcuPrefix = function_exists('apcu_fetch') && ini_get('apc.enabled') ? $apcuPrefix : null;
$this->apcuPrefix = function_exists('apcu_fetch') && filter_var(ini_get('apc.enabled'), FILTER_VALIDATE_BOOLEAN) ? $apcuPrefix : null;
}
/**
@ -377,7 +377,7 @@ class ClassLoader
$subPath = $class;
while (false !== $lastPos = strrpos($subPath, '\\')) {
$subPath = substr($subPath, 0, $lastPos);
$search = $subPath.'\\';
$search = $subPath . '\\';
if (isset($this->prefixDirsPsr4[$search])) {
$pathEnd = DIRECTORY_SEPARATOR . substr($logicalPathPsr4, $lastPos + 1);
foreach ($this->prefixDirsPsr4[$search] as $dir) {

View File

@ -52,14 +52,6 @@ return array(
'Icewind\\SMB\\Server' => $vendorDir . '/icewind/smb/src/Server.php',
'Icewind\\SMB\\Share' => $vendorDir . '/icewind/smb/src/Share.php',
'Icewind\\SMB\\System' => $vendorDir . '/icewind/smb/src/System.php',
'Icewind\\SMB\\Test\\AbstractShareTest' => $vendorDir . '/icewind/smb/tests/AbstractShareTest.php',
'Icewind\\SMB\\Test\\NativeShareTestTest' => $vendorDir . '/icewind/smb/tests/NativeShareTestTest.php',
'Icewind\\SMB\\Test\\NativeStreamTest' => $vendorDir . '/icewind/smb/tests/NativeStreamTest.php',
'Icewind\\SMB\\Test\\NotifyHandlerTest' => $vendorDir . '/icewind/smb/tests/NotifyHandlerTest.php',
'Icewind\\SMB\\Test\\ParserTest' => $vendorDir . '/icewind/smb/tests/ParserTest.php',
'Icewind\\SMB\\Test\\ServerTest' => $vendorDir . '/icewind/smb/tests/ServerTest.php',
'Icewind\\SMB\\Test\\ShareTestTest' => $vendorDir . '/icewind/smb/tests/ShareTestTest.php',
'Icewind\\SMB\\Test\\TestCase' => $vendorDir . '/icewind/smb/tests/TestCase.php',
'Icewind\\SMB\\TimeZoneProvider' => $vendorDir . '/icewind/smb/src/TimeZoneProvider.php',
'Icewind\\Streams\\CallbackWrapper' => $vendorDir . '/icewind/streams/src/CallbackWrapper.php',
'Icewind\\Streams\\Directory' => $vendorDir . '/icewind/streams/src/Directory.php',

View File

@ -82,14 +82,6 @@ class ComposerStaticInit98fe9b281934250b3a93f69a5ce843b3
'Icewind\\SMB\\Server' => __DIR__ . '/..' . '/icewind/smb/src/Server.php',
'Icewind\\SMB\\Share' => __DIR__ . '/..' . '/icewind/smb/src/Share.php',
'Icewind\\SMB\\System' => __DIR__ . '/..' . '/icewind/smb/src/System.php',
'Icewind\\SMB\\Test\\AbstractShareTest' => __DIR__ . '/..' . '/icewind/smb/tests/AbstractShareTest.php',
'Icewind\\SMB\\Test\\NativeShareTestTest' => __DIR__ . '/..' . '/icewind/smb/tests/NativeShareTestTest.php',
'Icewind\\SMB\\Test\\NativeStreamTest' => __DIR__ . '/..' . '/icewind/smb/tests/NativeStreamTest.php',
'Icewind\\SMB\\Test\\NotifyHandlerTest' => __DIR__ . '/..' . '/icewind/smb/tests/NotifyHandlerTest.php',
'Icewind\\SMB\\Test\\ParserTest' => __DIR__ . '/..' . '/icewind/smb/tests/ParserTest.php',
'Icewind\\SMB\\Test\\ServerTest' => __DIR__ . '/..' . '/icewind/smb/tests/ServerTest.php',
'Icewind\\SMB\\Test\\ShareTestTest' => __DIR__ . '/..' . '/icewind/smb/tests/ShareTestTest.php',
'Icewind\\SMB\\Test\\TestCase' => __DIR__ . '/..' . '/icewind/smb/tests/TestCase.php',
'Icewind\\SMB\\TimeZoneProvider' => __DIR__ . '/..' . '/icewind/smb/src/TimeZoneProvider.php',
'Icewind\\Streams\\CallbackWrapper' => __DIR__ . '/..' . '/icewind/streams/src/CallbackWrapper.php',
'Icewind\\Streams\\Directory' => __DIR__ . '/..' . '/icewind/streams/src/Directory.php',

View File

@ -1,17 +1,17 @@
[
{
"name": "icewind/smb",
"version": "v2.0.5",
"version_normalized": "2.0.5.0",
"version": "v2.0.6",
"version_normalized": "2.0.6.0",
"source": {
"type": "git",
"url": "https://github.com/icewind1991/SMB.git",
"reference": "b888dd81bd05532677e1469849d9065011256a33"
"reference": "3cf60dcb567fa62bb8e0358534591d0962ef6fec"
},
"dist": {
"type": "zip",
"url": "https://api.github.com/repos/icewind1991/SMB/zipball/b888dd81bd05532677e1469849d9065011256a33",
"reference": "b888dd81bd05532677e1469849d9065011256a33",
"url": "https://api.github.com/repos/icewind1991/SMB/zipball/3cf60dcb567fa62bb8e0358534591d0962ef6fec",
"reference": "3cf60dcb567fa62bb8e0358534591d0962ef6fec",
"shasum": ""
},
"require": {
@ -21,7 +21,7 @@
"require-dev": {
"phpunit/phpunit": "^4.8"
},
"time": "2018-03-28T13:51:31+00:00",
"time": "2019-02-06T16:18:34+00:00",
"type": "library",
"installation-source": "source",
"autoload": {

View File

@ -150,6 +150,7 @@ class Share extends AbstractShare {
return $file[0];
}
}
$escapedPath = $this->escapePath($path);
$output = $this->execute('allinfo ' . $escapedPath);
// Windows and non Windows Fileserver may respond different

View File

@ -16,6 +16,8 @@ class System {
private $stdbuf;
private $date;
public static function getFD($num) {
$folders = array(
'/proc/self/fd',
@ -43,6 +45,13 @@ class System {
return $this->net;
}
public function getDatePath() {
if (!$this->date) {
$this->date = trim(`which date`);
}
return $this->date;
}
public function hasStdBuf() {
if (!$this->stdbuf) {
$result = null;

View File

@ -43,10 +43,13 @@ class TimeZoneProvider {
);
$this->timeZone = exec($command);
}
if (!$this->timeZone) {
// fallback to server timezone
$this->timeZone = date_default_timezone_get();
if (!$this->timeZone) { // fallback to server timezone
$date = $this->system->getDatePath();
if ($date) {
$this->timeZone = exec($date . " +%z");
} else {
$this->timeZone = date_default_timezone_get();
}
}
}
return $this->timeZone;