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

Commit

Permalink
fix smb streamwrapper name conflict
Browse files Browse the repository at this point in the history
  • Loading branch information
c12simple committed Sep 30, 2015
1 parent 73cb845 commit a072ed3
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 6 deletions.
2 changes: 1 addition & 1 deletion core/src/plugins/access.smb/class.smbAccessWrapper.php
Expand Up @@ -64,7 +64,7 @@ protected static function initPath($path, $streamType, $storeOpenContext = false
}
}
$basePath = $repoObject->getOption("PATH");
$fullPath = "smb://".$credentials.$host."/";//.$basePath."/".$path;
$fullPath = "smbclient://".$credentials.$host."/";//.$basePath."/".$path;
if ($basePath!="") {
$fullPath.=trim($basePath, "/\\" );
}
Expand Down
10 changes: 5 additions & 5 deletions core/src/plugins/access.smb/smb.php
Expand Up @@ -412,11 +412,11 @@ public function clearstatcache ($url='')

public static function cleanUrl($url)
{
$url = str_replace("smb://", "smb:/__/__", $url);
$url = str_replace("smbclient://", "smbclient:/__/__", $url);
while (strstr($url, "//")!==FALSE) {
$url = str_replace("//", "/", $url);
}
$url = str_replace("smb:/__/__", "smb://", $url);
$url = str_replace("smbclient:/__/__", "smbclient://", $url);
return $url;
}

Expand Down Expand Up @@ -481,8 +481,8 @@ public function smbparseUrl ($url)
{
$pass = $_SESSION["AJXP_SESSION_REMOTE_PASS"];
//$pass = $pass["password"];
$pu['scheme'] = 'smb';
$temp = substr($url, 6);
$pu['scheme'] = 'smbclient';
$temp = substr($url, 12);
//echo $temp . "\n";
$pu['user'] = "";
if (strstr($temp, ":") !== false) {
Expand Down Expand Up @@ -772,5 +772,5 @@ function ConvSmbParameterToWinOs($params)
# Register 'smb' protocol !
###################################################################

stream_wrapper_register('smb', 'smb_stream_wrapper')
stream_wrapper_register('smbclient', 'smb_stream_wrapper')
or die ('Failed to register protocol');

0 comments on commit a072ed3

Please sign in to comment.