Skip to content

Commit a2a8b37

Browse files
committed
lcov: Fix .build_directory file not being deleted
Using option --to-package while capturing coverage data creates a temporary file named ".build_directory". Currently this file is not properly removed at the end of processing due to a changed CWD. This patch fixes this problem by reverting to the original CWD before trying to remove the temporary file. Signed-off-by: Peter Oberparleiter <[email protected]>
1 parent b9de825 commit a2a8b37

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

bin/lcov

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1050,6 +1050,7 @@ sub create_package($$$;$)
10501050
chdir($dir);
10511051
system("tar cfz $file .")
10521052
and die("ERROR: could not create package $file\n");
1053+
chdir($cwd);
10531054

10541055
# Remove temporary files
10551056
unlink("$dir/$pkg_build_file");
@@ -1063,7 +1064,6 @@ sub create_package($$$;$)
10631064
info(" data files ...........: $count\n");
10641065
}
10651066
}
1066-
chdir($cwd);
10671067
}
10681068

10691069
sub find_link_fn($$$)

0 commit comments

Comments
 (0)