summaryrefslogtreecommitdiff
path: root/utils.c
diff options
context:
space:
mode:
authorDimitri John Ledkov <xnox@ubuntu.com>2018-07-23 14:32:01 +0100
committerDimitri John Ledkov <xnox@ubuntu.com>2018-07-23 14:32:01 +0100
commit3b9cf4c8cda0818e4d3f9892ece9f7d99de13b03 (patch)
tree59446f505b5bb3b31b1b3bb81af997dda68407c2 /utils.c
parentf22f0302575d3a167ee550470c922de82e34342b (diff)
Diffstat (limited to 'utils.c')
-rw-r--r--utils.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/utils.c b/utils.c
index d81d4980..21de09d3 100644
--- a/utils.c
+++ b/utils.c
@@ -2460,7 +2460,7 @@ const char *subvol_strip_mountpoint(const char *mnt, const char *full_path)
if (!len)
return full_path;
- if ((strncmp(mnt, full_path, len) != 0) || (full_path[len] != '/')) {
+ if ((strncmp(mnt, full_path, len) != 0) || ((len > 1) && (full_path[len] != '/'))) {
error("not on mount point: %s", mnt);
exit(1);
}