Skip to content

Commit

Permalink
util: Make sure IsMounted() has the exact match
Browse files Browse the repository at this point in the history
Signed-off-by: Sheng Yang <sheng.yang@rancher.com>
  • Loading branch information
yasker committed Dec 28, 2019
1 parent 71a8d8b commit 3524b8a
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion util/util.go
Original file line number Diff line number Diff line change
Expand Up @@ -134,7 +134,7 @@ func IsMounted(mountPoint string) bool {
}
lines := strings.Split(output, "\n")
for _, line := range lines {
if strings.Contains(line, mountPoint) {
if strings.Contains(line, " "+mountPoint+" ") {
return true
}
}
Expand Down

0 comments on commit 3524b8a

Please sign in to comment.