Skip to content

genhtml (2.0) dies with source files in top directory #245

Closed
@entrope

Description

@entrope

When there is a source file in the top-level directory of a project (one of the directories passed with --prefix), the die("file error for " ...) call gets triggered: @$short_path has only one element, so nothing gets passed to File::Spec->catdir() and $rel_dir is empty.

Adding unshift @$short_path, '.' if $#$short_path == 0; before the call to catdir() avoids the crash but generates an HTML coverage report with no way to access the source files because the top-level directory has a zero-length (or no?) hyperlink to the per-directory report file.

With lcov 1.16, this would give the name "root" to the top-level directory.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions