We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent bdd6b7c commit e3afb93Copy full SHA for e3afb93
src/cargo/ops/cargo_package/mod.rs
@@ -1,7 +1,7 @@
1
use std::collections::BTreeMap;
2
use std::collections::BTreeSet;
3
use std::collections::HashMap;
4
-use std::fs::{self, File};
+use std::fs::File;
5
use std::io::SeekFrom;
6
use std::io::prelude::*;
7
use std::path::{Path, PathBuf};
@@ -177,10 +177,8 @@ fn create_package(
177
.context("failed to prepare local package for uploading")?;
178
179
dst.seek(SeekFrom::Start(0))?;
180
- let src_path = dst.path();
181
let dst_path = dst.parent().join(&filename);
182
- fs::rename(&src_path, &dst_path)
183
- .context("failed to move temporary tarball into final location")?;
+ dst.rename(&dst_path)?;
184
185
let dst_metadata = dst
186
.file()
0 commit comments