Skip to content
GitLab
Menu
Projects
Groups
Snippets
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Menu
Open sidebar
Steve Wills
kiwix-lib
Commits
1c68cf87
Commit
1c68cf87
authored
Oct 17, 2016
by
Kelson
Browse files
Fix ft index open for chunked files #346
parent
5ff4abfa
Changes
1
Hide whitespace changes
Inline
Side-by-side
src/common/kiwix/xapianSearcher.cpp
View file @
1c68cf87
...
...
@@ -40,14 +40,13 @@ namespace kiwix {
{
zim
::
File
zimFile
=
zim
::
File
(
directoryPath
);
zim
::
Article
xapianArticle
=
zimFile
.
getArticle
(
'Z'
,
"/fulltextIndex/xapian"
);
if
(
!
xapianArticle
.
good
())
throw
NoXapianIndexInZim
();
if
(
!
xapianArticle
.
good
())
throw
NoXapianIndexInZim
();
zim
::
offset_type
dbOffset
=
xapianArticle
.
getOffset
();
int
databasefd
=
open
(
directoryPath
.
c_str
(),
O_RDONLY
);
lseek
(
databasefd
,
dbOffset
,
SEEK_SET
);
this
->
readableDatabase
=
Xapian
::
Database
(
databasefd
);
}
catch
(
zim
::
ZimFileFormatError
)
{
}
catch
(...)
{
this
->
readableDatabase
=
Xapian
::
Database
(
directoryPath
);
}
}
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment