summaryrefslogtreecommitdiffstats
path: root/lib/private/Cache
diff options
context:
space:
mode:
Diffstat (limited to 'lib/private/Cache')
-rw-r--r--lib/private/Cache/File.php2
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);
}
}