Skip to content

Commit 9a96d7a

Browse files
authored
Merge pull request #2276 from seek4science/fix-tarbz2
Fix tarbz2
2 parents ca893f6 + 99cdf93 commit 9a96d7a

File tree

3 files changed

+7
-7
lines changed

3 files changed

+7
-7
lines changed

.github/workflows/tests.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -61,7 +61,7 @@ jobs:
6161
sudo apt install -y software-properties-common
6262
sudo add-apt-repository ppa:deadsnakes/ppa
6363
sudo apt update
64-
sudo apt install -y graphicsmagick graphviz libcurl4-gnutls-dev libreoffice poppler-utils build-essential \
64+
sudo apt install -y libmagick++-dev graphviz libcurl4-gnutls-dev libreoffice poppler-utils build-essential \
6565
git imagemagick libgmp-dev python3.9-dev python3.9-distutils python3-pip
6666
- name: Checkout code
6767
uses: actions/checkout@v4

lib/seek/content_type_detection.rb

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -56,7 +56,7 @@ def is_extractable_spreadsheet?(blob = self)
5656

5757
# is any zipped format, that can be extracted from
5858
def is_unzippable_datafile?(blob = self)
59-
blob.file_exists? && (is_zip?(blob)|| is_tar?(blob) || is_tgz?(blob) || is_tbz?(blob) || is_7zip?(blob) || is_txz?(blob))
59+
blob.file_exists? && (is_zip?(blob)|| is_tar?(blob) || is_tgz?(blob) || is_tbz2?(blob) || is_7zip?(blob) || is_txz?(blob))
6060
end
6161

6262
def is_in_simulatable_size_limit?(blob = self)
@@ -79,8 +79,8 @@ def is_tgz?(blob = self)
7979
blob.content_type_file_extensions.include?('tgz')
8080
end
8181

82-
def is_tbz?(blob = self)
83-
blob.content_type_file_extensions.include?('tbz')
82+
def is_tbz2?(blob = self)
83+
blob.content_type_file_extensions.include?('tbz2')
8484
end
8585

8686
def is_txz?(blob = self)

lib/seek/data_files/unzip.rb

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -11,8 +11,8 @@ def unzip(tmp_dir)
1111
unzip_zip(tmp_dir)
1212
elsif content_blob.is_tgz?
1313
unzip_tgz(tmp_dir)
14-
elsif content_blob.is_tbz?
15-
unzip_tbz(tmp_dir)
14+
elsif content_blob.is_tbz2?
15+
unzip_tbz2(tmp_dir)
1616
elsif content_blob.is_txz?
1717
unzip_txz(tmp_dir)
1818
elsif content_blob.is_tar?
@@ -35,7 +35,7 @@ def unzip_tar(tmp_dir, input = content_blob.filepath)
3535
Minitar.unpack(input, tmp_dir)
3636
end
3737

38-
def unzip_tbz(tmp_dir)
38+
def unzip_tbz2(tmp_dir)
3939
Tempfile.create('decompressed_tar') do |temp_tar|
4040
Bzip2::FFI::Reader.open(content_blob.filepath) do |reader|
4141
IO.copy_stream(reader, temp_tar)

0 commit comments

Comments
 (0)