1
0
Fork 0
mirror of https://github.com/geometer/FBReaderJ.git synced 2025-10-06 03:50:19 +02:00

Update ZLFile.cpp

the container.xml file cause  unable to parse epub file
epub文件结构导致无法解析问题
This commit is contained in:
Donkey 2019-10-29 09:09:56 +08:00 committed by GitHub
parent e83aec9f94
commit 1ae9a03a55
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -37,6 +37,10 @@ ZLFile::ZLFile() : myMimeTypeIsUpToDate(true), myInfoIsFilled(true) {
}
ZLFile::ZLFile(const std::string &path, const std::string &mimeType) : myPath(path), myMimeType(mimeType), myMimeTypeIsUpToDate(!mimeType.empty()), myInfoIsFilled(false) {
std::string::size_type position = myPath.find(":./");
if (position != myPath.npos){
myPath.replace(position, 3, ":");
}
ZLFSManager::Instance().normalize(myPath);
{
std::size_t index = ZLFSManager::Instance().findLastFileNameDelimiter(myPath);