mirror of
https://github.com/xcat2/xcat-core.git
synced 2025-06-12 17:30:19 +00:00
Handle the output of cpio properly
This commit is contained in:
@ -2261,7 +2261,11 @@ sub copycd
|
||||
my $copied = 0;
|
||||
my ($percent, $fout);
|
||||
while (<PIPE>) {
|
||||
next if /^cpio:/;
|
||||
if (/^cpio:/) {
|
||||
chomp;
|
||||
$callback->({ data => $_ });
|
||||
next;
|
||||
}
|
||||
$percent = $copied / $numFiles;
|
||||
$fout = sprintf "%0.2f%%", $percent * 100;
|
||||
$callback->({ sinfo => "$fout" });
|
||||
|
Reference in New Issue
Block a user