<commit_before>module CarthageCache

  class Archiver

    def archive(archive_path, destination_path)
      files = Dir.entries(archive_path).select { |x| !x.start_with?(".") }
      `cd #{archive_path} && zip -r -X #{File.expand_path(destination_path)} #{files.join(' ')} > /dev/null`
    end

    def unarchive(archive_path, destination_path)
      `unzip #{archive_path} -d #{destination_path} > /dev/null`
    end

  end
  
end<commit_msg>Fixes #7 - Overwrites files when unzipping archive.<commit_after>module CarthageCache

  class Archiver

    def archive(archive_path, destination_path)
      files = Dir.entries(archive_path).select { |x| !x.start_with?(".") }
      `cd #{archive_path} && zip -r -X #{File.expand_path(destination_path)} #{files.join(' ')} > /dev/null`
    end

    def unarchive(archive_path, destination_path)
      `unzip -o #{archive_path} -d #{destination_path} > /dev/null`
    end

  end

end
{'fraction_non_alphanumeric': 0.1423948220064725, 'fraction_numerical': 0.0010787486515641855, 'mean_word_length': 3.64, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 7, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '7295440', 'n_tokens_mistral': 317, 'n_tokens_neox': 308, 'n_words': 68}