Skip to content

Epub parsing error when href is a ralative path #67

@izhoubin

Description

@izhoubin

navigation_reader.dart:

String tocFileEntryPath =
        ZipPathUtils.combine(contentDirectoryPath, tocManifestItem.Href);

zip_path_utils.dart:

static String combine(String directory, String fileName) { 
    if (directory == null || directory == "") {
      return fileName;
    } else {
      return directory + "/" + fileName;
    }
  }
}

If the tocManifestItem.Href is a ralative path such as "./toc.ncx",the method combine() will return wrong path like OEBPS/./toc.ncx,and error occurred.

Ralative path should be considered in method combine.

Thanks.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions