summaryrefslogtreecommitdiffstats
path: root/lib/private
diff options
context:
space:
mode:
authorJoas Schilling <coding@schilljs.com>2017-03-20 12:46:48 +0100
committerGitHub <noreply@github.com>2017-03-20 12:46:48 +0100
commit85a5c24934d0ed4d7e2d266a18a25ba649a53d63 (patch)
tree230f6d25643ef0329d9e31aac462f2e705001024 /lib/private
parent257fbd85eb09645189e58e97856f777536f78250 (diff)
parentab9e3525cc4623ac0de24d61723dd87dce7cd605 (diff)
downloadnextcloud-server-85a5c24934d0ed4d7e2d266a18a25ba649a53d63.tar.gz
nextcloud-server-85a5c24934d0ed4d7e2d266a18a25ba649a53d63.zip
Merge pull request #3939 from nextcloud/downstream-27159
Fix malformed logging in exception
Diffstat (limited to 'lib/private')
-rw-r--r--lib/private/Files/View.php11
1 files changed, 11 insertions, 0 deletions
diff --git a/lib/private/Files/View.php b/lib/private/Files/View.php
index 6ffb5edff3e..506128d7fcd 100644
--- a/lib/private/Files/View.php
+++ b/lib/private/Files/View.php
@@ -96,8 +96,12 @@ class View {
private $updaterEnabled = true;
+ /** @var \OC\User\Manager */
private $userManager;
+ /** @var \OCP\ILogger */
+ private $logger;
+
/**
* @param string $root
* @throws \Exception If $root contains an invalid path
@@ -114,6 +118,7 @@ class View {
$this->lockingProvider = \OC::$server->getLockingProvider();
$this->lockingEnabled = !($this->lockingProvider instanceof \OC\Lock\NoopLockingProvider);
$this->userManager = \OC::$server->getUserManager();
+ $this->logger = \OC::$server->getLogger();
}
public function getAbsolutePath($path = '/') {
@@ -2068,6 +2073,12 @@ class View {
$parts = explode('/', trim($path, '/'), 3);
// "$user", "files", "path/to/dir"
if (!isset($parts[1]) || $parts[1] !== 'files') {
+ $this->logger->error(
+ '$absolutePath must be relative to "files", value is "%s"',
+ [
+ $absolutePath
+ ]
+ );
throw new \InvalidArgumentException('$absolutePath must be relative to "files"');
}
if (isset($parts[2])) {