Encode urls in parts

This commit is contained in:
Robin Appelman 2014-10-17 14:51:21 +02:00
commit 156d25d7f5

View file

@ -64,7 +64,8 @@ class NativeShare implements IShare {
$url = sprintf('smb://%s/%s', $this->server->getHost(), $this->name); $url = sprintf('smb://%s/%s', $this->server->getHost(), $this->name);
if ($path) { if ($path) {
$path = trim($path, '/'); $path = trim($path, '/');
$url .= '/' . rawurlencode($path); $url .= '/';
$url .= implode('/', array_map('rawurlencode', explode('/', $path)));
} }
return $url; return $url;
} }