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
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
The reason will be displayed to describe this comment to others. Learn more.
I'll take a look into it, but it'll definitely make the code quite a lot more complex. There is also a good reason for not preserving permissions when extracting: the extracted files cannot automatically be run on your system when you extract an archive containing a malicious binary. It'll be something that you will have to opt into rather than being the default behaviour, maybe as a configuration in the setup function for the plugin. I personally do not use this feature as well, as most archives I deal with contain images or documents instead of executables.
So, no guarantees on this, but I'll look into tar and its flags and see if it is possible to have something sensible. I am also running short on time as the new year is starting and things are ramping up again. But my initial idea is to have a configuration option to keep permissions, and then use the tar extractor when the archive is a tar archive if this option is set and tar exists.
Regarding the new extraction tool built into yazi, I doubt that is coming any time soon. There is a massive amount of different archive file formats out there and the tool will need to be able to extract and decompress archives. This is not an easy task and even tools like 7zip don't support every archive file format that exists. It is a whole project on its own.
57b4f28
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Any chance
tar
could be used for tarballs? That would fix sxyazi/yazi#1864yazi
maintainer said a new extraction tool (that would possibly address this) was planned, but we haven't had any news about it for months now.Just curious if that's something you would consider adding with
augment-command
, maybe that's out of scope.57b4f28
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I'll take a look into it, but it'll definitely make the code quite a lot more complex. There is also a good reason for not preserving permissions when extracting: the extracted files cannot automatically be run on your system when you extract an archive containing a malicious binary. It'll be something that you will have to opt into rather than being the default behaviour, maybe as a configuration in the setup function for the plugin. I personally do not use this feature as well, as most archives I deal with contain images or documents instead of executables.
So, no guarantees on this, but I'll look into
tar
and its flags and see if it is possible to have something sensible. I am also running short on time as the new year is starting and things are ramping up again. But my initial idea is to have a configuration option to keep permissions, and then use the tar extractor when the archive is a tar archive if this option is set andtar
exists.Regarding the new extraction tool built into
yazi
, I doubt that is coming any time soon. There is a massive amount of different archive file formats out there and the tool will need to be able to extract and decompress archives. This is not an easy task and even tools like 7zip don't support every archive file format that exists. It is a whole project on its own.