wummel / patool

patool is a portable command line archive file manager
http://wummel.github.io/patool/
GNU General Public License v3.0
404 stars 68 forks source link

list_archive not working on windows #147

Closed timiion closed 9 months ago

timiion commented 9 months ago

OS: Windows 11 Version: 2.1.1

C:\Users\Dell\Desktop>patool version
patool 2.1.1

Nothing output when use patool list command, see as below:

C:\Users\Dell\Desktop>patool list hello.zip
INFO patool: Listing hello.zip ...
INFO patool: running D:\tools\7-Zip\7z.EXE l -- hello.zip
INFO patool:     with creationflags=134217728, input=

C:\Users\Dell\Desktop>

Actually, the archive file has no problem, see as below:

C:\Users\Dell\Desktop>D:\tools\7-Zip\7z.EXE l -- hello.zip

7-Zip 23.01 (x64) : Copyright (c) 1999-2023 Igor Pavlov : 2023-06-20

Scanning the drive for archives:
1 file, 447 bytes (1 KiB)

Listing archive: hello.zip

--
Path = hello.zip
Type = zip
Physical Size = 447

   Date      Time    Attr         Size   Compressed  Name
------------------- ----- ------------ ------------  ------------------------
2023-12-21 09:35:58 ....A           83           79  hello\hello.c
2023-10-31 19:19:24 ....A          190          140  hello\Makefile
------------------- ----- ------------ ------------  ------------------------
2023-12-21 09:35:58                273          219  2 files

C:\Users\Dell\Desktop>

list_archive > _handle_archive > run_archive_cmdlist > util.run_checked In the util.py, I saw the return is res.returncode. list_archive will return a code ?

import patoolib

file_list = patoolib.list_archive(archive_path, verbosity=-1)

The file_list value is None forever, though I changed verbosity to other number.

timiion commented 9 months ago

On ubuntu, patoolib.list_archive works well. The console output will display the archive files, but the return value is None too. How could I get the archive list to value file_list.

wummel commented 9 months ago

A new version 2.2.0 of patool has been released on 14.02.2024. Therefore this bug will be closed. If you think this issue is not solved, please open a new issue.