Ticket #28: 0001-Trivial-port-to-GIO-mimetype-determination.patch

File 0001-Trivial-port-to-GIO-mimetype-determination.patch, 920 bytes (added by nirbheek, 14 years ago)

Patch to replace use of gnomevfs for mimetype detection with GIO

  • tests/test_xapianindex.py

    From cf557684755c919b8786af9e44e6ea6c88811207 Mon Sep 17 00:00:00 2001
    From: Nirbheek Chauhan <nirbheek.chauhan@gmail.com>
    Date: Tue, 23 Dec 2008 15:46:14 +0530
    Subject: [PATCH] Trivial port to GIO (mimetype determination)
    
    ---
     tests/test_xapianindex.py |    4 ++--
     1 files changed, 2 insertions(+), 2 deletions(-)
    
    diff --git a/tests/test_xapianindex.py b/tests/test_xapianindex.py
    index c455c44..5eea363 100644
    a b from datetime import datetime 
    44
    55import time
    66import unittest
    7 import gnomevfs
     7import gio
    88
    99DEFAULT_STORE = '/tmp/_xi_test'
    1010
    DEFAULT_STORE = '/tmp/_xi_test' 
    1212def index_file(iconn, filepath):
    1313    """Index a file."""
    1414
    15     mimetype = gnomevfs.get_mime_type(filepath)
     15    mimetype = gio.content_type_guess(filepath)
    1616    main, subtype = mimetype.split('/',1)
    1717
    1818    stat = os.stat(filepath)