return non escaped path from exceptions

This commit is contained in:
Robin Appelman 2016-08-27 00:25:35 +02:00
commit 82f961896f
3 changed files with 20 additions and 3 deletions

View file

@ -63,8 +63,15 @@ class NativeState {
}
}
protected function testResult($result, $path) {
protected function testResult($result, $uri) {
if ($result === false or $result === null) {
// smb://host/share/path
if (is_string($uri)) {
list(, , , , $path) = explode('/', $uri, 5);
$path = '/' . $path;
} else {
$path = null;
}
$this->handleError($path);
}
}

View file

@ -99,8 +99,8 @@ class Share extends AbstractShare {
}
protected function simpleCommand($command, $path) {
$path = $this->escapePath($path);
$cmd = $command . ' ' . $path;
$escapedPath = $this->escapePath($path);
$cmd = $command . ' ' . $escapedPath;
$output = $this->execute($cmd);
return $this->parseOutput($output, $path);
}