report the missing filename in media check

https://anki.tenderapp.com/discussions/ankidesktop/40578-check-media-error
This commit is contained in:
Damien Elmes 2020-04-17 17:17:42 +10:00
parent aa562f490c
commit 37bc44a8f5

View file

@ -262,7 +262,7 @@ where
// add a copy of the file using the correct name // add a copy of the file using the correct name
let data = data_for_file(&self.mgr.media_folder, disk_fname)?.ok_or_else(|| { let data = data_for_file(&self.mgr.media_folder, disk_fname)?.ok_or_else(|| {
AnkiError::IOError { AnkiError::IOError {
info: "file disappeared".into(), info: format!("file disappeared: {}", disk_fname),
} }
})?; })?;
let fname = self.mgr.add_file(ctx, disk_fname, &data)?; let fname = self.mgr.add_file(ctx, disk_fname, &data)?;