Return both first and last error from mkpath.
This commit is contained in:
parent
7d41d9eaa5
commit
eb346f5573
@ -75,7 +75,10 @@ Status mkpath(CSlice path, int32 mode) {
|
||||
}
|
||||
}
|
||||
if (last_error.is_error()) {
|
||||
return first_error;
|
||||
if (last_error.message() == first_error.message() && last_error.code() == first_error.code()) {
|
||||
return first_error;
|
||||
}
|
||||
return last_error.move_as_error_suffix(PSLICE() << ": " << first_error);
|
||||
}
|
||||
return Status::OK();
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user