include the invalid path in error message

This commit is contained in:
Robin Appelman 2025-03-13 16:43:35 +01:00
commit 6f5b94d7fe

View file

@ -23,7 +23,7 @@ abstract class AbstractShare implements IShare {
protected function verifyPath(string $path): void {
foreach ($this->forbiddenCharacters as $char) {
if (strpos($path, $char) !== false) {
throw new InvalidPathException('Invalid path, "' . $char . '" is not allowed');
throw new InvalidPathException("Invalid path \"$path\", \"$char\" is not allowed");
}
}
}