summaryrefslogtreecommitdiff
path: root/cmds-receive.c
diff options
context:
space:
mode:
Diffstat (limited to 'cmds-receive.c')
-rw-r--r--cmds-receive.c7
1 files changed, 7 insertions, 0 deletions
diff --git a/cmds-receive.c b/cmds-receive.c
index 20b3db09..03d21e90 100644
--- a/cmds-receive.c
+++ b/cmds-receive.c
@@ -848,6 +848,13 @@ static int do_receive(struct btrfs_receive *r, const char *tomnt, int r_fd,
ret = -EINVAL;
goto out;
}
+ if (ret > 0) {
+ fprintf(stderr,
+ "ERROR: %s doesn't belong to btrfs mount point\n",
+ dest_dir_full_path);
+ ret = -EINVAL;
+ goto out;
+ }
r->mnt_fd = open(r->root_path, O_RDONLY | O_NOATIME);
if (r->mnt_fd < 0) {
ret = -errno;