We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 532c02c commit 3fbd2f2Copy full SHA for 3fbd2f2
1 file changed
sandboxed_api/sandbox2/stack_trace.cc
@@ -203,12 +203,11 @@ absl::StatusOr<std::vector<std::string>> StackTracePeer::LaunchLibunwindSandbox(
203
return absl::InternalError(
204
"Could not create temporary directory for unwinding");
205
}
206
- struct UnwindTempDirectoryCleanup {
207
- ~UnwindTempDirectoryCleanup() {
208
- file_util::fileops::DeleteRecursively(capture);
+ absl::Cleanup delete_unwind_temp_directory = [&unwind_temp_directory] {
+ if (!file_util::fileops::DeleteRecursively(unwind_temp_directory)) {
+ LOG(ERROR) << "Failed to delete " << unwind_temp_directory;
209
210
- char* capture;
211
- } cleanup{unwind_temp_directory};
+ };
212
213
// Copy over important files from the /proc directory as we can't mount them.
214
const std::string unwind_temp_maps_path =
0 commit comments