summaryrefslogtreecommitdiffstats
path: root/Dump.c
diff options
context:
space:
mode:
Diffstat (limited to 'Dump.c')
-rw-r--r--Dump.c5
1 files changed, 5 insertions, 0 deletions
diff --git a/Dump.c b/Dump.c
index 38e8f238..736bcb60 100644
--- a/Dump.c
+++ b/Dump.c
@@ -272,6 +272,11 @@ int Restore_metadata(char *dev, char *dir, struct context *c,
fname);
goto err;
}
+ if (stat(fname, &stb) != 0) {
+ pr_err("Could not stat %s for --restore.\n",
+ fname);
+ goto err;
+ }
if (((unsigned long long)stb.st_size) != size) {
pr_err("%s is not the same size as %s - cannot restore.\n",
fname, dev);