Skip to content
This repository has been archived by the owner on Nov 25, 2020. It is now read-only.

Commit

Permalink
Browse files Browse the repository at this point in the history
smb.php don't work with lot of files or folders if "Windows OS"
better fix
  • Loading branch information
Nanomani committed Apr 5, 2014
1 parent 896b1fd commit 80a3f6f
Showing 1 changed file with 2 additions and 7 deletions.
9 changes: 2 additions & 7 deletions core/src/plugins/access.smb/smb.php
Expand Up @@ -187,7 +187,7 @@ public function client ($params, $purl)
$descriptorspec = array(
0 => array("pipe", "r"), // stdin is a pipe that the child will read from
1 => array("pipe", "w"), // stdout is a pipe that the child will write to
2 => array("pipe", "w") // stderr is a pipe to write to
2 => array("pipe", "rw") // stderr is a pipe to write to
);
$env = null;
if (defined('AJXP_LOCALE') && stripos(PHP_OS, "win") === false) {
Expand All @@ -196,12 +196,7 @@ public function client ($params, $purl)
$process = proc_open($cmd, $descriptorspec, $pipes, null, $env);
if (is_resource($process)) {
fclose($pipes[0]);
if (PHP_OS == "WIN32" || PHP_OS == "WINNT" || PHP_OS == "Windows") {
$error = stream_get_contents($pipes[2], 524);
} else {
$error = stream_get_contents($pipes[2]);
}

$error = stream_get_contents($pipes[2]);
fclose($pipes[2]);
if ($error != "") {
$error = strtolower($error);
Expand Down

0 comments on commit 80a3f6f

Please sign in to comment.