File tree Expand file tree Collapse file tree 1 file changed +2
-9
lines changed Expand file tree Collapse file tree 1 file changed +2
-9
lines changed Original file line number Diff line number Diff line change @@ -70,8 +70,7 @@ pub struct State {
7070fn create_hd (
7171 image_file : impl AsRef < Path > ,
7272 backing_file : Option < impl AsRef < Path > > ,
73- size : & str ,
74- work_dir : Option < impl AsRef < Path > > ,
73+ size : & str
7574) -> Result < ( ) > {
7675 let mut command = Command :: new ( "qemu-img" ) ;
7776 command. arg ( "create" ) . arg ( "-f" ) . arg ( "qcow2" ) ;
@@ -83,11 +82,6 @@ fn create_hd(
8382 }
8483 command. arg ( image_file. as_ref ( ) ) ;
8584 command. arg ( size) ;
86-
87- // Set working directory if provided
88- if let Some ( work_dir) = work_dir {
89- command. current_dir ( work_dir. as_ref ( ) ) ;
90- }
9185 let output = command. output ( ) ?;
9286 if !output. status . success ( ) {
9387 bail ! (
@@ -350,8 +344,7 @@ impl VmConfig {
350344 create_hd (
351345 & hda_path,
352346 self . image . hda . as_ref ( ) ,
353- & disk_size,
354- Some ( & workdir) ,
347+ & disk_size
355348 ) ?;
356349 }
357350 if !cfg. user . is_empty ( ) {
You can’t perform that action at this time.
0 commit comments