mirror of
https://github.com/nextcloud/server.git
synced 2026-05-28 04:32:30 -04:00
refactor: Use str_starts_with
Co-authored-by: Benjamin Gaussorgues <benjamin.gaussorgues@nextcloud.com> Signed-off-by: Carl Schwan <carl@carlschwan.eu>
This commit is contained in:
parent
27339601f6
commit
eadcd1cc84
1 changed files with 1 additions and 1 deletions
|
|
@ -123,7 +123,7 @@ class Manager implements IMountManager {
|
|||
$result = [];
|
||||
$pathLen = strlen($path);
|
||||
foreach ($this->mounts as $mountPoint => $mount) {
|
||||
if (strlen($mountPoint) > $pathLen && strncmp($mountPoint, $path, $pathLen) === 0) {
|
||||
if (strlen($mountPoint) > $pathLen && str_starts_with($mountPoint, $path)) {
|
||||
$result[] = $mount;
|
||||
}
|
||||
}
|
||||
|
|
|
|||
Loading…
Reference in a new issue