From 150b28f72467251bc55aad2dd0d4b05645a0fa76 Mon Sep 17 00:00:00 2001 From: Karel Picman Date: Tue, 2 Jan 2018 16:48:46 +0100 Subject: [PATCH] pdf and Word(.doc) files are not seachable in repositories --- extra/xapian_indexer.rb | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/extra/xapian_indexer.rb b/extra/xapian_indexer.rb index 4d2066b5..d77d8d92 100644 --- a/extra/xapian_indexer.rb +++ b/extra/xapian_indexer.rb @@ -338,7 +338,7 @@ def convert_to_text(fpath, type) return text if !File.exist?(FORMAT_HANDLERS[type].split(' ').first) case type when 'pdf' - text = "#{FORMAT_HANDLERS[type]} #{fpath} -" + text = `#{FORMAT_HANDLERS[type]} #{fpath} -` when /(xlsx|docx|odt|pptx)/i system "#{$unzip} -d #{$tempdir}/temp #{fpath} > /dev/null", :out=>'/dev/null' case type @@ -358,7 +358,7 @@ def convert_to_text(fpath, type) log "Error: #{e.to_s} reading #{fout}", true end else - text = "#{FORMAT_HANDLERS[type]} #{fpath}" + text = `#{FORMAT_HANDLERS[type]} #{fpath}` end return text end