-
Notifications
You must be signed in to change notification settings - Fork 104
Open
Labels
Description
While working on #94 we wound up wanting to build better errors for some cases, one of them is this FinalError:
builder.append_file(path, file.file_mut()).map_err(|err| {
FinalError::with_title("Could not create archive")
.detail("Unexpected error while trying to read file")
.detail(format!("Error: {}.", err))
.into_owned()
})?;
It isn't a great error message since it doesn't tell you which file broke, in a scenario where you are compressing/decompressing multiple files this could be an issue.
Now, it is troublesome to insert the output_file, since it was inserted on the tar writer from it's generic call. This is a problem because:
- It seems that the Writer object does not have a getter to the output_path where it intends to write stuff, so we can't get this information from it.
- So we would end up trying to pass output_path on the function? Maybe, but since it's a generic call we would need to reproduce it to the zip call aswell I think.
So... I can't see a clear path of action, and this is already a hard error to occur aswell, therefore I will put the discussion tag and the low-priority one
marcospb19