Auto merge of #44498 - alexcrichton:fix-nightlies, r=alexcrichton
rustbuild: Fix a distribution bug with rustdoc Apparently `File::create` was called when there was an existing hard link or the like, causing an existing file to get accidentally truncated! Closes #44487
This commit is contained in:
commit
07d950f38f
@ -900,6 +900,7 @@ impl Step for PlainSourceTarball {
|
||||
fn install(src: &Path, dstdir: &Path, perms: u32) {
|
||||
let dst = dstdir.join(src.file_name().unwrap());
|
||||
t!(fs::create_dir_all(dstdir));
|
||||
drop(fs::remove_file(&dst));
|
||||
{
|
||||
let mut s = t!(fs::File::open(&src));
|
||||
let mut d = t!(fs::File::create(&dst));
|
||||
|
Loading…
x
Reference in New Issue
Block a user