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/Cache/File.php | |
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/Cache/File.php')
-rw-r--r-- | lib/private/Cache/File.php | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/lib/private/Cache/File.php b/lib/private/Cache/File.php index 1f63e462bb5..72fc95a802b 100644 --- a/lib/private/Cache/File.php +++ b/lib/private/Cache/File.php @@ -160,7 +160,7 @@ class File implements ICache { $dh = $storage->opendir('/'); if (is_resource($dh)) { while (($file = readdir($dh)) !== false) { - if ($file != '.' and $file != '..' and ($prefix === '' || strpos($file, $prefix) === 0)) { + if ($file != '.' and $file != '..' and ($prefix === '' || str_starts_with($file, $prefix))) { $storage->unlink('/' . $file); } } |