diff --git a/Dump.c b/Dump.c index 38e8f23..736bcb6 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);