Skip to content

Commit 7185ec6

Browse files
authored
Rollup merge of #146036 - Mark-Simulacrum:rust-1, r=Kobzol
Use move_file for rename in tracing This avoids panicking when the source and destination are on different filesystems.
2 parents 226517e + 2dc5752 commit 7185ec6

File tree

1 file changed

+5
-1
lines changed

1 file changed

+5
-1
lines changed

src/bootstrap/src/utils/tracing.rs

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -168,7 +168,11 @@ mod inner {
168168
impl TracingGuard {
169169
pub fn copy_to_dir(self, dir: &std::path::Path) {
170170
drop(self.guard);
171-
std::fs::rename(&self.chrome_tracing_path, dir.join("chrome-trace.json")).unwrap();
171+
crate::utils::helpers::move_file(
172+
&self.chrome_tracing_path,
173+
dir.join("chrome-trace.json"),
174+
)
175+
.unwrap();
172176
}
173177
}
174178

0 commit comments

Comments
 (0)