diff options
author | Faraz Samapoor <fsamapoor@gmail.com> | 2023-05-15 15:17:19 +0330 |
---|---|---|
committer | Faraz Samapoor <fsamapoor@gmail.com> | 2023-05-15 15:17:19 +0330 |
commit | e7cc7653b885c49b1b3f0a78f91ea05a53e102d8 (patch) | |
tree | 42da61d5c6e988d7c9eff7e081327a73f661dc89 /lib/private/Encryption | |
parent | 8bdb50fd507bfe68161ab98eba903872083ea4f3 (diff) | |
download | nextcloud-server-e7cc7653b885c49b1b3f0a78f91ea05a53e102d8.tar.gz nextcloud-server-e7cc7653b885c49b1b3f0a78f91ea05a53e102d8.zip |
Refactors "strpos" calls in lib/private to improve code readability.
Signed-off-by: Faraz Samapoor <fsamapoor@gmail.com>
Diffstat (limited to 'lib/private/Encryption')
-rw-r--r-- | lib/private/Encryption/Util.php | 5 |
1 files changed, 1 insertions, 4 deletions
diff --git a/lib/private/Encryption/Util.php b/lib/private/Encryption/Util.php index 6ae0006e955..a468908ffc8 100644 --- a/lib/private/Encryption/Util.php +++ b/lib/private/Encryption/Util.php @@ -311,10 +311,7 @@ class Util { // detect alternative key storage root $rootDir = $this->getKeyStorageRoot(); if ($rootDir !== '' && - 0 === strpos( - Filesystem::normalizePath($path), - Filesystem::normalizePath($rootDir) - ) + str_starts_with(Filesystem::normalizePath($path), Filesystem::normalizePath($rootDir)) ) { return true; } |