From e7cc7653b885c49b1b3f0a78f91ea05a53e102d8 Mon Sep 17 00:00:00 2001 From: Faraz Samapoor Date: Mon, 15 May 2023 15:17:19 +0330 Subject: Refactors "strpos" calls in lib/private to improve code readability. Signed-off-by: Faraz Samapoor --- lib/private/Files/Config/UserMountCache.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'lib/private/Files/Config') diff --git a/lib/private/Files/Config/UserMountCache.php b/lib/private/Files/Config/UserMountCache.php index 9838b0a213c..90f94b6598e 100644 --- a/lib/private/Files/Config/UserMountCache.php +++ b/lib/private/Files/Config/UserMountCache.php @@ -487,7 +487,7 @@ class UserMountCache implements IUserMountCache { $path = rtrim($path, '/') . '/'; $mounts = $this->getMountsForUser($user); return array_filter($mounts, function (ICachedMountInfo $mount) use ($path) { - return $mount->getMountPoint() !== $path && strpos($mount->getMountPoint(), $path) === 0; + return $mount->getMountPoint() !== $path && str_starts_with($mount->getMountPoint(), $path); }); } } -- cgit v1.2.3