Re: Indexing mail attachments & files inside Zip/tar.
- From: Michael Levy <mlevy wardium homeip net>
- To: vvaradhan novell com
- Cc: Dashboard <dashboard-hackers gnome org>
- Subject: Re: Indexing mail attachments & files inside Zip/tar.
- Date: Mon, 18 Oct 2004 20:52:03 +0200
On Tue, 2004-10-19 at 05:15, Veerapuram Varadhan wrote:
> > The problems I ran across seem trivial but caused me to run
> > out
> > of time. Basically the problem is this: It is easy to know the MIME
> > type
> > of the archive (tar or zip files for eaxmaple), but it gets a little
> > tougher
> > to know the MIME type of the contained documents. I ran across some
> > memory
> > corruption issues when trying to use the existing MIME type-sniffing
> > functions
> > ifrom gnome-vfs.
>
> We need to see the possibility of identifying a MIME-type through URI or
> sort of.. ??
I would say that we need to identify MIME type from the URI, which
should be doable with the gnome-vfs functions gnome_vfs_get_mime_type()
or gnome_vfs_mime_type_from_name_or_default(), but it would also be cool
to be able to determine MIME type from content with
gnome_vfs_get_mime_type_for_data().
> > The problems were most likely due to my poor understanding of
> > Marshalling in .NET,
> > so others will probably have an easier go at it. Also, I noticed that
> > the functions
> > behave poorly when attempting to get the MIME type of a non-existing
> > file (i.e. a
> > file which is not actually on disk, but rather is an "entry" in an
> > archive).
>
> hmmm... have to really dig into it.. let me do it and "bug" the list
> with questions.. ;-)
I've attached the test case I used. Compile it with:
mcs test.cs `pkg-config --libs gtk-sharp`
Then run it with (should work):
mono test.exe ./test.cs
OR with (if foo and bar do not exist)
mono test.exe foo bar
and you'll notice that it enters a never-ending loop (probably due to
memory corruption).
> > I can try
> > to find the C code I wrote to test the functions if someone is
> > interested.
>
> Yes. I am interested!!
I'm sorry, I've been looking around my system and can't seem to find the
C code I mentioned :( If I do happen to find it again, I'll send it to
the list.
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]