mirror of
https://github.com/simon987/sist2.git
synced 2025-04-19 10:16:42 +00:00
Fix #373
This commit is contained in:
parent
ce242d1053
commit
f984baf7fd
@ -155,19 +155,17 @@ void parse(parse_job_t *job) {
|
|||||||
doc->meta_head = NULL;
|
doc->meta_head = NULL;
|
||||||
doc->meta_tail = NULL;
|
doc->meta_tail = NULL;
|
||||||
doc->size = job->vfile.st_size;
|
doc->size = job->vfile.st_size;
|
||||||
doc->mtime = job->vfile.mtime;
|
doc->mtime = MAX(job->vfile.mtime, 0);
|
||||||
doc->mime = get_mime(job);
|
doc->mime = get_mime(job);
|
||||||
generate_doc_id(doc->filepath + ScanCtx.index.desc.root_len, doc->doc_id);
|
generate_doc_id(doc->filepath + ScanCtx.index.desc.root_len, doc->doc_id);
|
||||||
|
|
||||||
if (doc->mime == GET_MIME_ERROR_FATAL) {
|
if (doc->mime == GET_MIME_ERROR_FATAL) {
|
||||||
|
|
||||||
CLOSE_FILE(job->vfile)
|
CLOSE_FILE(job->vfile)
|
||||||
free(doc);
|
free(doc);
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (database_mark_document(ProcData.index_db, doc->doc_id, doc->mtime)) {
|
if (database_mark_document(ProcData.index_db, doc->doc_id, doc->mtime)) {
|
||||||
|
|
||||||
CLOSE_FILE(job->vfile)
|
CLOSE_FILE(job->vfile)
|
||||||
free(doc);
|
free(doc);
|
||||||
return;
|
return;
|
||||||
|
Loading…
x
Reference in New Issue
Block a user