make sure the root has a trailing slash

This commit is contained in:
Robin Appelman 2015-02-13 14:51:56 +01:00 committed by Thomas Müller
parent 35077ec34e
commit 6467369cad
1 changed files with 3 additions and 0 deletions

View File

@ -45,6 +45,9 @@ class SMB extends Common {
if (!$this->root || $this->root[0] != '/') {
$this->root = '/' . $this->root;
}
if (substr($this->root, -1, 1) != '/') {
$this->root .= '/';
}
} else {
throw new \Exception('Invalid configuration');
}