"Cannot find working tool" on V4.0
zhbzhbzhbz opened this issue · 3 comments
After I saw "Removing dependency on unrar for extract, thus making maintenance of alternative backends more manageable." in the Release News,
I joyfully removed the code rarfile.UNRAR_TOOL=/**/**/UnRAR.exe
.
But I got the error "Cannot find working tool".
So what does "Removing dependency on unrar for extract" exactly means? Thanks~
That means RarFile.extract() does not use unrar x
command. Instead it uses RarFile.open() (which internally uses unrar p
command) and writes file itself.
This gives option of returning final filename from .extract() - as final sanitization is done by rarfile, it knows it.
If we would keep using unrar, then either rarfile must simulate unrar internal filename sanitization logic, or parse unrar output, both which would be messy. And crazy, when wanting to keep working with alternative tools - unar/bsdtar - as all their behavour across different OSes and versions must be simulated.
It seems more interesting to support alternative tools than keep fully-featured unrar x
for extraction. Thus the decision.
Summary - rarfile still depends on unrar
for decompression. But it does not depend on it for writing file on disk.
Now I re-read the release note, and it might be misleading indeed.
I updated the note to be more clear.
Now I re-read the release note, and it might be misleading indeed.
I updated the note to be more clear.
thanks~