Skip to content

Commit eadcd1c

Browse files
CarlSchwanAltahrim
andauthored
refactor: Use str_starts_with
Co-authored-by: Benjamin Gaussorgues <benjamin.gaussorgues@nextcloud.com> Signed-off-by: Carl Schwan <carl@carlschwan.eu>
1 parent 2733960 commit eadcd1c

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

lib/private/Files/Mount/Manager.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -123,7 +123,7 @@ public function findIn(string $path): array {
123123
$result = [];
124124
$pathLen = strlen($path);
125125
foreach ($this->mounts as $mountPoint => $mount) {
126-
if (strlen($mountPoint) > $pathLen && strncmp($mountPoint, $path, $pathLen) === 0) {
126+
if (strlen($mountPoint) > $pathLen && str_starts_with($mountPoint, $path)) {
127127
$result[] = $mount;
128128
}
129129
}

0 commit comments

Comments
 (0)