Index: magic.mime
===================================================================
RCS file: /cvs/drupal-contrib/contributions/modules/mimedetect/magic.mime,v
retrieving revision 1.1
diff -u -r1.1 magic.mime
--- magic.mime	5 Jan 2008 05:04:09 -0000	1.1
+++ magic.mime	8 May 2009 21:37:53 -0000
@@ -310,7 +310,7 @@
 # gzip (GNU zip, not to be confused with [Info-ZIP/PKWARE] zip archiver)
 0       string          \037\213        application/x-gzip
 
-0		string			PK\003\004		application/x-zip
+0		string			PK\003\004		application/zip
 
 # RAR archiver (Greg Roelofs, newt@uchicago.edu)
 0	string		Rar!		application/x-rar
@@ -899,10 +899,10 @@
 >24		string	@		application/octet-stream
 
 0		string	MZ
->30		string	Copyright\ 1989-1990\ PKWARE\ Inc.	application/x-zip
+>30		string	Copyright\ 1989-1990\ PKWARE\ Inc.	application/zip
 
 0		string	MZ
->30		string	PKLITE\ Copr.	application/x-zip
+>30		string	PKLITE\ Copr.	application/zip
 
 0		string	MZ
 >36		string	LHa's\ SFX	application/x-lha
Index: mimedetect.module
===================================================================
RCS file: /cvs/drupal-contrib/contributions/modules/mimedetect/mimedetect.module,v
retrieving revision 1.6
diff -u -r1.6 mimedetect.module
--- mimedetect.module	21 Jul 2008 22:00:14 -0000	1.6
+++ mimedetect.module	8 May 2009 21:37:53 -0000
@@ -156,8 +156,9 @@
     // On OSX the -i switch is -I, so if we use the long flags everyone is
     // happy. I checked back to version 3.41 and it still supports the long
     // names but if you run into problems you can use " -bi ".
-    $command = $filebin .' --brief --mime '. escapeshellarg($file->filepath);
-    $mime = trim(exec($command, $out));
+    $magic_file = dirname(__FILE__) .'/magic';
+    $command = $filebin .' --brief --mime --magic-file='. escapeshellarg($magic_file) .' '. escapeshellarg($file->filepath);
+    $mime = trim(exec($command));
     // with text we often get charset like 'text/plain; charset=us-ascii'
     $mime = split(';', $mime);
     $mime = trim($mime[0]);
