summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--cmds-restore.c5
1 files changed, 5 insertions, 0 deletions
diff --git a/cmds-restore.c b/cmds-restore.c
index 43384932..c84ac17d 100644
--- a/cmds-restore.c
+++ b/cmds-restore.c
@@ -1186,6 +1186,11 @@ int cmd_restore(int argc, char **argv)
break;
case 'r':
root_objectid = arg_strtou64(optarg);
+ if (!is_fstree(root_objectid)) {
+ fprintf(stderr, "objectid %llu is not a valid fs/file tree\n",
+ root_objectid);
+ exit(1);
+ }
break;
case 'l':
list_roots = 1;