]> source.dussan.org Git - nextcloud-server.git/commitdiff
update icewind/smb to 1.0.0
authorRobin Appelman <icewind@owncloud.com>
Fri, 10 Apr 2015 12:36:37 +0000 (14:36 +0200)
committerRobin Appelman <icewind@owncloud.com>
Fri, 10 Apr 2015 12:59:16 +0000 (14:59 +0200)
apps/files_external/3rdparty/.gitignore [new file with mode: 0644]
apps/files_external/3rdparty/composer.json
apps/files_external/3rdparty/composer.lock
apps/files_external/3rdparty/composer/installed.json
apps/files_external/3rdparty/icewind/smb/src/Parser.php
apps/files_external/3rdparty/icewind/smb/src/RawConnection.php
apps/files_external/3rdparty/icewind/smb/src/Share.php

diff --git a/apps/files_external/3rdparty/.gitignore b/apps/files_external/3rdparty/.gitignore
new file mode 100644 (file)
index 0000000..a9a7266
--- /dev/null
@@ -0,0 +1 @@
+example.php
index b1315651c99a7441e2928c56988f52f0006f51d5..8992220d8438a8ee381e884af303106ee3ed695e 100644 (file)
@@ -6,7 +6,7 @@
                "vendor-dir": "."
        },
        "require": {
-               "icewind/smb": "dev-master",
+               "icewind/smb": "1.0.0",
                "icewind/streams": "0.2"
        }
 }
index 0a7dcf89876a8e5b494f5b08b812781f545df4b7..ffd5c7c3c65355080600db3ebf7fff84b6186ed7 100644 (file)
@@ -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": [],
index eae04e877d209c2329633d22edf804624a2d7094..441ed1f14fa790557a1bd14cdfadf8c1f331d3b8 100644 (file)
     },
     {
         "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": {
index 381c4917a92e604ee3d599e02cd40c3f47c0e97a..8b4de7825e42c82619398ef42c229de63f9c7368 100644 (file)
@@ -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);
index 926ce3714cfea902c39bc4444b17f279a6b5efb7..15478511a7270cb25859eea0d9a062bd6cb394e9 100644 (file)
@@ -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);
index 025a84380a1a5bb1ae80a5a2a257309c87ef3c12..7c24f9f2e901567a68ab33930dc94715adbb528b 100644 (file)
@@ -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);
                }