Unable to retrieve files from tar when the name of the inside files start with `./`
Nobody has claimed this yet.
Assessment
- Difficulty
- 2/5
- Estimated time
- 1-3 hours
- Newbie friendliness
- 68/100
Research direction
Start with the extractfile() method in ete4/ncbi_taxonomy/ncbiquery.py, linked in the issue, and reproduce the behavior with the two tar commands shown. Done means files stored with leading ./ in the archive can be retrieved just like files without that prefix.
Written by the indexing model from the issue text.
Description
etetoolkit version used: 3.1.3, but is also seen from the code of the problematic script of ete4 at the time of writing
extractfile() method cannot recognize an existing file inside a tar file when the inside file has leading ./ in the name. Found out when used NCBITaxa(dbfile=ete_db_fpath, taxdump_file=ncbi_taxdump_fpath).
Not working for:
$ tar --create --gzip --file "resources/ncbi_taxdump/taxdump.tar.gz" --directory "resources/ncbi_taxdump/new_taxdump_233" .
$ tar -tf resources/ncbi_taxdump/taxdump.tar.gz
./
./taxidlineage.dmp
./nodes.dmp
./host.dmp
./readme.txt
./delnodes.dmp
./division.dmp
./typeoftype.dmp
./merged.dmp
./images.dmp
./typematerial.dmp
./gencode.dmp
./gc.prt
./fullnamelineage.dmp
./rankedlineage.dmp
./citations.dmp
./excludedfromtype.dmp
./names.dmp
Working for:
$ tar --create --gzip --file "resources/ncbi_taxdump/taxdump.tar.gz" --directory "resources/ncbi_taxdump/new_taxdump_233" --transform 's|^\./||' .
$ tar -tf resources/ncbi_taxdump/taxdump.tar.gz
./
taxidlineage.dmp
nodes.dmp
host.dmp
readme.txt
delnodes.dmp
division.dmp
typeoftype.dmp
merged.dmp
images.dmp
typematerial.dmp
gencode.dmp
gc.prt
fullnamelineage.dmp
rankedlineage.dmp
citations.dmp
excludedfromtype.dmp
names.dmp
- Dominant language
- Python
- Stars
- 885
- Forks
- 232
- PR merge metrics
- No merged PRs in 30d
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
More from etetoolkit/ete
-
Difficulty 1/5 Under an hour Newbie friendliness 65/100
etetoolkit/ete#647 ·
-
Difficulty 2/5 1-3 hours Newbie friendliness 68/100
etetoolkit/ete#527 ·
-
Difficulty 3/5 1-2 days Newbie friendliness 68/100
etetoolkit/ete#817 ·
-
Difficulty 4/5 3-5 days Newbie friendliness 55/100
etetoolkit/ete#816 ·
-
Difficulty 3/5 1-2 days Newbie friendliness 68/100
etetoolkit/ete#811 ·
Similar issues
-
Difficulty 2/5 1-3 hours Newbie friendliness 88/100
-
Difficulty 2/5 1-3 hours Newbie friendliness 82/100
-
Difficulty 2/5 1-3 hours Newbie friendliness 78/100
-
enhancement
Difficulty 2/5 1-3 hours Newbie friendliness 72/100
-
Difficulty 2/5 1-3 hours Newbie friendliness 74/100