Author: brad Date: 2006-08-16 18:45:41 +0000 (Wed, 16 Aug 2006) New Revision: 17574
WebSVN: http://websvn.samba.org/cgi-bin/viewcvs.cgi?view=rev&root=samba&rev=17574 Log: Modified the function copy_to_guest(), so that it creates the destination directory on the guest filesystem before it tries to copy files there. Modified: branches/SOC/bnh/perl/VMHost.pm Changeset: Modified: branches/SOC/bnh/perl/VMHost.pm =================================================================== --- branches/SOC/bnh/perl/VMHost.pm 2006-08-16 17:43:13 UTC (rev 17573) +++ branches/SOC/bnh/perl/VMHost.pm 2006-08-16 18:45:41 UTC (rev 17574) @@ -260,6 +260,17 @@ return ($err_code); } + # Create the directory $dest_path on the guest VM filesystem. + my $cmd = "cmd.exe "; + my $cmd_args = "/C MKDIR " . $dest_dir; + $err_code = run_on_guest(NULL, $cmd, $cmd_args); + if ( $err_code != 0) { + my $old_err_str = $err_str; + $err_str = "Creating directory $dest_dir on host: " . + . $old_err_str; + return ($err_code); + } + # If $src_filepath specifies a file, create it in $dest_path # and keep the same name. # If $src_path is a directory, create the files it contains in
