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 cb49ba62cbc8a8e38878aa5fce76b4422c389799..a0ec22deeeddef4555d8a4b08eb326bc224fdcc1 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