Use move_file for rename in tracing
This avoids panicking when the source and destinations are on different filesystems.
This commit is contained in:
parent
e95db591a4
commit
2dc57526c2
1 changed files with 5 additions and 1 deletions
|
|
@ -168,7 +168,11 @@ mod inner {
|
|||
impl TracingGuard {
|
||||
pub fn copy_to_dir(self, dir: &std::path::Path) {
|
||||
drop(self.guard);
|
||||
std::fs::rename(&self.chrome_tracing_path, dir.join("chrome-trace.json")).unwrap();
|
||||
crate::utils::helpers::move_file(
|
||||
&self.chrome_tracing_path,
|
||||
dir.join("chrome-trace.json"),
|
||||
)
|
||||
.unwrap();
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue