Add more context regarding which missing file creation failed

This commit is contained in:
apatniv 2020-12-05 20:17:45 -05:00
parent 3ab911afa1
commit a3a5386da0

View file

@ -49,7 +49,7 @@ fn create_missing(src_dir: &Path, summary: &Summary) -> Result<()> {
}
debug!("Creating missing file {}", filename.display());
let mut f = File::create(&filename)?;
let mut f = File::create(&filename).with_context(|| format!("Unable to create missing file: {}", filename.display()))?;
writeln!(f, "# {}", link.name)?;
}
}