Skip to content

Commit f054a21

Browse files
author
Vincent Dupont
committed
vfs: fix _find_mount with "/" mountpoint
1 parent 1ef1829 commit f054a21

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

sys/vfs/vfs.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -585,7 +585,7 @@ inline static int _allocate_mount(const char *mount_point)
585585
_free_mount(md);
586586
return -EINVAL;
587587
}
588-
if (mountp->mount_point[len - 1] == '/') {
588+
if (len > 1 && mountp->mount_point[len - 1] == '/') {
589589
/* remove trailing slash */
590590
mountp->mount_point[len - 1] = '\0';
591591
}

0 commit comments

Comments
 (0)