From: Tom Hughes Date: Thu, 31 Jul 2008 08:06:09 +0000 (+0000) Subject: Ignore any files in an __MACOSX folder in a zip file, as these are X-Git-Tag: live~8292 X-Git-Url: https://git.openstreetmap.org./rails.git/commitdiff_plain/8dbaf76e7cbdaa3aa0c6a9ac8d1fb886c1fe9fcd Ignore any files in an __MACOSX folder in a zip file, as these are metadata files added by the MAC OS X zip tool. --- diff --git a/app/models/trace.rb b/app/models/trace.rb index cb49ba62c..a0ec22dee 100644 --- a/app/models/trace.rb +++ b/app/models/trace.rb @@ -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