aboutsummaryrefslogtreecommitdiffstats
path: root/lib/private/Files/View.php
diff options
context:
space:
mode:
authorMorris Jobke <hey@morrisjobke.de>2018-01-25 22:26:47 +0100
committerMorris Jobke <hey@morrisjobke.de>2018-01-26 13:38:34 +0100
commit9ff51aafc518460e6c45996f09e9fe74e5f8d2e8 (patch)
tree7aa302bf04530f0add196f6bcd6e8636333e6be0 /lib/private/Files/View.php
parentb9bbb894f8b01e000bb5e3a8a82db7bebad3ea00 (diff)
downloadnextcloud-server-9ff51aafc518460e6c45996f09e9fe74e5f8d2e8.tar.gz
nextcloud-server-9ff51aafc518460e6c45996f09e9fe74e5f8d2e8.zip
Use index based string access for substr with length of 1
Signed-off-by: Morris Jobke <hey@morrisjobke.de>
Diffstat (limited to 'lib/private/Files/View.php')
-rw-r--r--lib/private/Files/View.php6
1 files changed, 3 insertions, 3 deletions
diff --git a/lib/private/Files/View.php b/lib/private/Files/View.php
index fb0b116666e..1553444e05d 100644
--- a/lib/private/Files/View.php
+++ b/lib/private/Files/View.php
@@ -698,7 +698,7 @@ class View {
// do not allow deleting the root
return false;
}
- $postFix = (substr($path, -1, 1) === '/') ? '/' : '';
+ $postFix = (substr($path, -1) === '/') ? '/' : '';
$absolutePath = Filesystem::normalizePath($this->getAbsolutePath($path));
$mount = Filesystem::getMountManager()->find($absolutePath . $postFix);
if ($mount and $mount->getInternalPath($absolutePath) === '') {
@@ -1067,7 +1067,7 @@ class View {
* @return bool|null|string
*/
public function hash($type, $path, $raw = false) {
- $postFix = (substr($path, -1, 1) === '/') ? '/' : '';
+ $postFix = (substr($path, -1) === '/') ? '/' : '';
$absolutePath = Filesystem::normalizePath($this->getAbsolutePath($path));
if (Filesystem::isValidPath($path)) {
$path = $this->getRelativePath($absolutePath);
@@ -1119,7 +1119,7 @@ class View {
* \OC\Files\Storage\Storage for delegation to a storage backend for execution
*/
private function basicOperation($operation, $path, $hooks = [], $extraParam = null) {
- $postFix = (substr($path, -1, 1) === '/') ? '/' : '';
+ $postFix = (substr($path, -1) === '/') ? '/' : '';
$absolutePath = Filesystem::normalizePath($this->getAbsolutePath($path));
if (Filesystem::isValidPath($path)
and !Filesystem::isFileBlacklisted($path)