Skip to content

Commit 5bbdacd

Browse files
authored
Merge pull request #548 from OpenBioSim/fix_547
2 parents 9f13077 + 6b494d3 commit 5bbdacd

2 files changed

Lines changed: 8 additions & 8 deletions

File tree

‎src/BioSimSpace/Gateway/_requirements.py‎

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -2037,13 +2037,13 @@ def _unarchive(name):
20372037
else:
20382038
dir = _os.path.splitext(name)[0] + "/"
20392039

2040-
# List of supported tar file formats.
2041-
tarfiles = ["tar.gz", "tar.bz2", "tar"]
2040+
# List of supported tar file extensions.
2041+
tar_exts = [".tar.gz", ".tar.bz2", ".tar"]
20422042

20432043
# Check whether this is a tar compressed file.
2044-
for tar_name in tarfiles:
2044+
for ext in tar_exts:
20452045
# Found a match.
2046-
if tar_name in name.lower():
2046+
if name.lower().endswith(ext):
20472047
# The list of decompressed files.
20482048
files = []
20492049

‎src/BioSimSpace/Sandpit/Exscientia/Gateway/_requirements.py‎

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -2037,13 +2037,13 @@ def _unarchive(name):
20372037
else:
20382038
dir = _os.path.splitext(name)[0] + "/"
20392039

2040-
# List of supported tar file formats.
2041-
tarfiles = ["tar.gz", "tar.bz2", "tar"]
2040+
# List of supported tar file extensions.
2041+
tar_exts = [".tar.gz", ".tar.bz2", ".tar"]
20422042

20432043
# Check whether this is a tar compressed file.
2044-
for tar_name in tarfiles:
2044+
for ext in tar_exts:
20452045
# Found a match.
2046-
if tar_name in name.lower():
2046+
if name.lower().endswith(ext):
20472047
# The list of decompressed files.
20482048
files = []
20492049

0 commit comments

Comments
 (0)