update icewind/smb to 1.0.0
This commit is contained in:
parent
75312f96d4
commit
a41fbf7a92
|
@ -0,0 +1 @@
|
|||
example.php
|
|
@ -6,7 +6,7 @@
|
|||
"vendor-dir": "."
|
||||
},
|
||||
"require": {
|
||||
"icewind/smb": "dev-master",
|
||||
"icewind/smb": "1.0.0",
|
||||
"icewind/streams": "0.2"
|
||||
}
|
||||
}
|
||||
|
|
|
@ -4,20 +4,20 @@
|
|||
"Read more about it at http://getcomposer.org/doc/01-basic-usage.md#composer-lock-the-lock-file",
|
||||
"This file is @generated automatically"
|
||||
],
|
||||
"hash": "c854ee7f5bdcb3f2c8ee0a8cfe5e193a",
|
||||
"hash": "2554253c9f91c67cd0db753a69105bc0",
|
||||
"packages": [
|
||||
{
|
||||
"name": "icewind/smb",
|
||||
"version": "dev-master",
|
||||
"version": "v1.0.0",
|
||||
"source": {
|
||||
"type": "git",
|
||||
"url": "https://github.com/icewind1991/SMB.git",
|
||||
"reference": "ef4b128143b7272e97665b84862d77faabf7d36d"
|
||||
"reference": "4f5d9db3a9397e30476f92eb753751b54d6d4fa5"
|
||||
},
|
||||
"dist": {
|
||||
"type": "zip",
|
||||
"url": "https://api.github.com/repos/icewind1991/SMB/zipball/ef4b128143b7272e97665b84862d77faabf7d36d",
|
||||
"reference": "ef4b128143b7272e97665b84862d77faabf7d36d",
|
||||
"url": "https://api.github.com/repos/icewind1991/SMB/zipball/4f5d9db3a9397e30476f92eb753751b54d6d4fa5",
|
||||
"reference": "4f5d9db3a9397e30476f92eb753751b54d6d4fa5",
|
||||
"shasum": ""
|
||||
},
|
||||
"require": {
|
||||
|
@ -45,7 +45,7 @@
|
|||
}
|
||||
],
|
||||
"description": "php wrapper for smbclient and libsmbclient-php",
|
||||
"time": "2015-03-13 12:17:14"
|
||||
"time": "2015-04-10 12:10:08"
|
||||
},
|
||||
{
|
||||
"name": "icewind/streams",
|
||||
|
@ -91,9 +91,7 @@
|
|||
"packages-dev": [],
|
||||
"aliases": [],
|
||||
"minimum-stability": "stable",
|
||||
"stability-flags": {
|
||||
"icewind/smb": 20
|
||||
},
|
||||
"stability-flags": [],
|
||||
"prefer-stable": false,
|
||||
"prefer-lowest": false,
|
||||
"platform": [],
|
||||
|
|
|
@ -43,17 +43,17 @@
|
|||
},
|
||||
{
|
||||
"name": "icewind/smb",
|
||||
"version": "dev-master",
|
||||
"version_normalized": "9999999-dev",
|
||||
"version": "v1.0.0",
|
||||
"version_normalized": "1.0.0.0",
|
||||
"source": {
|
||||
"type": "git",
|
||||
"url": "https://github.com/icewind1991/SMB.git",
|
||||
"reference": "ef4b128143b7272e97665b84862d77faabf7d36d"
|
||||
"reference": "4f5d9db3a9397e30476f92eb753751b54d6d4fa5"
|
||||
},
|
||||
"dist": {
|
||||
"type": "zip",
|
||||
"url": "https://api.github.com/repos/icewind1991/SMB/zipball/ef4b128143b7272e97665b84862d77faabf7d36d",
|
||||
"reference": "ef4b128143b7272e97665b84862d77faabf7d36d",
|
||||
"url": "https://api.github.com/repos/icewind1991/SMB/zipball/4f5d9db3a9397e30476f92eb753751b54d6d4fa5",
|
||||
"reference": "4f5d9db3a9397e30476f92eb753751b54d6d4fa5",
|
||||
"shasum": ""
|
||||
},
|
||||
"require": {
|
||||
|
@ -63,7 +63,7 @@
|
|||
"require-dev": {
|
||||
"satooshi/php-coveralls": "dev-master"
|
||||
},
|
||||
"time": "2015-03-13 12:17:14",
|
||||
"time": "2015-04-10 12:10:08",
|
||||
"type": "library",
|
||||
"installation-source": "source",
|
||||
"autoload": {
|
||||
|
|
|
@ -92,6 +92,11 @@ class Parser {
|
|||
$size = 0;
|
||||
foreach ($output as $line) {
|
||||
list($name, $value) = explode(':', $line, 2);
|
||||
// A line = explode statement may not fill all array elements
|
||||
// properly. May happen when accessing non Windows Fileservers
|
||||
$words = explode(':', $line, 2);
|
||||
$name = isset($words[0]) ? $words[0] : '';
|
||||
$value = isset($words[1]) ? $words[1] : '';
|
||||
$value = trim($value);
|
||||
if ($name === 'write_time') {
|
||||
$mtime = strtotime($value);
|
||||
|
|
|
@ -149,6 +149,18 @@ class RawConnection {
|
|||
return;
|
||||
}
|
||||
if ($terminate) {
|
||||
// if for case that posix_ functions are not available
|
||||
if (function_exists('posix_kill')) {
|
||||
$status = proc_get_status($this->process);
|
||||
$ppid = $status['pid'];
|
||||
$pids = preg_split('/\s+/', `ps -o pid --no-heading --ppid $ppid`);
|
||||
foreach($pids as $pid) {
|
||||
if(is_numeric($pid)) {
|
||||
//9 is the SIGKILL signal
|
||||
posix_kill($pid, 9);
|
||||
}
|
||||
}
|
||||
}
|
||||
proc_terminate($this->process);
|
||||
}
|
||||
proc_close($this->process);
|
||||
|
|
|
@ -120,6 +120,12 @@ class Share implements IShare {
|
|||
public function stat($path) {
|
||||
$escapedPath = $this->escapePath($path);
|
||||
$output = $this->execute('allinfo ' . $escapedPath);
|
||||
// Windows and non Windows Fileserver may respond different
|
||||
// to the allinfo command for directories. If the result is a single
|
||||
// line = error line, redo it with a different allinfo parameter
|
||||
if ($escapedPath == '""' && count($output) < 2) {
|
||||
$output = $this->execute('allinfo ' . '"."');
|
||||
}
|
||||
if (count($output) < 3) {
|
||||
$this->parseOutput($output, $path);
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue