Enhacement: Xapian parse eml and msg files in same way as word, excel... #717
This commit is contained in:
parent
6f671b509c
commit
0e72eb76f0
@ -368,10 +368,10 @@ def add_or_update_index(databasepath, indexconf, project, repository, identifier
|
||||
uri = generate_uri(project, repository, identifier, path)
|
||||
return unless uri
|
||||
text = nil
|
||||
if Redmine::MimeType.is_type?('text', path) #type eq 'txt'
|
||||
if Redmine::MimeType.is_type?('text', path) || (%(js msg eml).include?(type))
|
||||
text = repository.cat(path, identifier)
|
||||
else
|
||||
fname = path.split( '/').last.tr(' ', '_')
|
||||
fname = path.split('/').last.tr(' ', '_')
|
||||
bstr = nil
|
||||
bstr = repository.cat(path, identifier)
|
||||
File.open( "#{$tempdir}/#{fname}", 'wb+') do | bs |
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user