Skip to content

Commit 4f6e020

Browse files
committed
Move the combined components instead of copying
1 parent 678aa11 commit 4f6e020

File tree

1 file changed

+3
-4
lines changed

1 file changed

+3
-4
lines changed

src/combiner.rs

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -83,15 +83,14 @@ impl Combiner {
8383
return Err(io::Error::new(io::ErrorKind::Other, msg));
8484
}
8585

86-
// Copy components to new combined installer
86+
// Move components to the new combined installer
8787
let mut pkg_components = String::new();
8888
fs::File::open(pkg_dir.join("components"))?
8989
.read_to_string(&mut pkg_components)?;
9090
for component in pkg_components.split_whitespace() {
91-
// All we need to do is copy the component directory
91+
// All we need to do is move the component directory
9292
let component_dir = package_dir.join(&component);
93-
fs::create_dir(&component_dir)?;
94-
copy_recursive(&pkg_dir.join(&component), &component_dir)?;
93+
fs::rename(&pkg_dir.join(&component), &component_dir)?;
9594

9695
// Merge the component name
9796
writeln!(&components, "{}", component)?;

0 commit comments

Comments
 (0)