diff options
author | Morris Jobke <hey@morrisjobke.de> | 2017-09-04 14:05:34 +0200 |
---|---|---|
committer | GitHub <noreply@github.com> | 2017-09-04 14:05:34 +0200 |
commit | c04a494ea7c960c0a6b85c0826f02f35a07c8886 (patch) | |
tree | 90b6039ec43b498f6639a3a326575b8b021077ec /lib | |
parent | 2060ff591bc0ab2a5600d40acc4020849075b2c9 (diff) | |
parent | b9b88aa666ba8420311b6f6f24b42aadd03eed04 (diff) | |
download | nextcloud-server-c04a494ea7c960c0a6b85c0826f02f35a07c8886.tar.gz nextcloud-server-c04a494ea7c960c0a6b85c0826f02f35a07c8886.zip |
Merge pull request #6064 from nextcloud/fix-5219-absolute-path-must-be-relative-to-files-on-theming-update
Still throw a locked exception when the path is not relative to $user/files/
Diffstat (limited to 'lib')
-rw-r--r-- | lib/private/Files/View.php | 19 |
1 files changed, 13 insertions, 6 deletions
diff --git a/lib/private/Files/View.php b/lib/private/Files/View.php index 71b453d299a..7fee0883a25 100644 --- a/lib/private/Files/View.php +++ b/lib/private/Files/View.php @@ -1941,11 +1941,18 @@ class View { ); } } catch (\OCP\Lock\LockedException $e) { - // rethrow with the a human-readable path - throw new \OCP\Lock\LockedException( - $this->getPathRelativeToFiles($absolutePath), - $e - ); + try { + // rethrow with the a human-readable path + throw new \OCP\Lock\LockedException( + $this->getPathRelativeToFiles($absolutePath), + $e + ); + } catch (\InvalidArgumentException $e) { + throw new \OCP\Lock\LockedException( + $absolutePath, + $e + ); + } } } @@ -2050,7 +2057,7 @@ class View { return ($pathSegments[2] === 'files') && (count($pathSegments) > 3); } - return true; + return strpos($path, '/appdata_') !== 0; } /** |