You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Is your feature request related to a problem? Please describe.
Currently, support for opening archive files is based on a table that maps extensions to some metadata like them either them being a "zip" or a "tar" file. This does not take into consideration the other types of archive supported, and also fails to support files without extensions.
Describe the solution you'd like
It should be possible to open an archive file such as:
$ tar cf /tmp/tarfile /etc/issue
And while is_archive() behaves as expected:
>>>archive.is_archive('/tmp/tarfile')
True
The more important extract() does not:
archive.extract('/tmp/tarfile', '/tmp')
Traceback (most recent call last):
File "<stdin>", line 1, in <module>
File "/home/cleber/src/avocado/avocado/avocado/utils/archive.py", line 366, in uncompress
with ArchiveFile.open(filename) as x:
^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/home/cleber/src/avocado/avocado/avocado/utils/archive.py", line 225, in open
return cls(filename, mode)
^^^^^^^^^^^^^^^^^^^
File "/home/cleber/src/avocado/avocado/avocado/utils/archive.py", line 205, in __init__
raise ArchiveException("file is not an archive")
avocado.utils.archive.ArchiveException: file is not an archive
Describe alternatives you've considered
Requiring users to properly name files, but this is sometimes not possible or just an annoyance. Also the extension table is really not mapping well to the supported archive formats.
The text was updated successfully, but these errors were encountered:
Is your feature request related to a problem? Please describe.
Currently, support for opening archive files is based on a table that maps extensions to some metadata like them either them being a "zip" or a "tar" file. This does not take into consideration the other types of archive supported, and also fails to support files without extensions.
Describe the solution you'd like
It should be possible to open an archive file such as:
And while
is_archive()
behaves as expected:The more important
extract()
does not:Describe alternatives you've considered
Requiring users to properly name files, but this is sometimes not possible or just an annoyance. Also the extension table is really not mapping well to the supported archive formats.
The text was updated successfully, but these errors were encountered: