Ignore any files in an __MACOSX folder in a zip file, as these are
authorTom Hughes <tom@compton.nu>
Thu, 31 Jul 2008 08:06:09 +0000 (08:06 +0000)
committerTom Hughes <tom@compton.nu>
Thu, 31 Jul 2008 08:06:09 +0000 (08:06 +0000)
metadata files added by the MAC OS X zip tool.

app/models/trace.rb

index cb49ba6..a0ec22d 100644 (file)
@@ -158,7 +158,7 @@ class Trace < ActiveRecord::Base
       elsif bzipped
         system("bunzip2 -c #{trace_name} > #{tmpfile.path}")
       elsif zipped
-        system("unzip -p #{trace_name} > #{tmpfile.path}")
+        system("unzip -p #{trace_name} -x '__MACOSX/*' > #{tmpfile.path}")
       end
 
       tmpfile.unlink