Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Epub parsing error when href is a ralative path #67

Open
izhoubin opened this issue Oct 25, 2019 · 0 comments
Open

Epub parsing error when href is a ralative path #67

izhoubin opened this issue Oct 25, 2019 · 0 comments

Comments

@izhoubin
Copy link

izhoubin commented Oct 25, 2019

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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant