changeset 863:50a8b4a06abf

indexing filters: use single-quoted filenames to avoid problems with blanks
author Thomas Waldmann <tw AT waldmann-edv DOT de>
date Tue, 20 Jun 2006 21:03:04 +0200
parents 7e103a2591db
children b4006d50d2dc
files MoinMoin/filter/application_msword.py MoinMoin/filter/application_pdf.py MoinMoin/filter/application_vnd_ms_excel.py
diffstat 3 files changed, 3 insertions(+), 3 deletions(-) [+]
line wrap: on
line diff
--- a/MoinMoin/filter/application_msword.py	Tue Jun 20 03:02:28 2006 +0200
+++ b/MoinMoin/filter/application_msword.py	Tue Jun 20 21:03:04 2006 +0200
@@ -11,5 +11,5 @@
 from MoinMoin import filter
 
 def execute(indexobj, filename):
-    return filter.execfilter("HOME=/tmp antiword %s", filename) # no HOME makes antiword complain
+    return filter.execfilter("HOME=/tmp antiword '%s'", filename) # no HOME makes antiword complain
 
--- a/MoinMoin/filter/application_pdf.py	Tue Jun 20 03:02:28 2006 +0200
+++ b/MoinMoin/filter/application_pdf.py	Tue Jun 20 21:03:04 2006 +0200
@@ -11,5 +11,5 @@
 from MoinMoin import filter
 
 def execute(indexobj, filename):
-    return filter.execfilter("pdftotext -enc UTF-8 %s -", filename)
+    return filter.execfilter("pdftotext -enc UTF-8 '%s' -", filename)
 
--- a/MoinMoin/filter/application_vnd_ms_excel.py	Tue Jun 20 03:02:28 2006 +0200
+++ b/MoinMoin/filter/application_vnd_ms_excel.py	Tue Jun 20 21:03:04 2006 +0200
@@ -11,7 +11,7 @@
 from MoinMoin import filter
 
 def execute(indexobj, filename):
-    data = filter.execfilter("xls2csv %s", filename)
+    data = filter.execfilter("xls2csv '%s'", filename)
     # xls2csv uses comma as field separator and "field content",
     # we strip both to not confuse the indexer
     data = data.replace(u',', u' ').replace(u'"', u' ')