diff options
author | Marc Cornellà <hello@mcornella.com> | 2023-04-06 21:06:16 +0200 |
---|---|---|
committer | Marc Cornellà <hello@mcornella.com> | 2023-04-06 21:06:16 +0200 |
commit | 49d34d00cdaf132f318700398bf42120ff1af8e7 (patch) | |
tree | 59ea56f21e131fb7ff48d04c48996240faca2993 /plugins/zsh-navigation-tools/n-list-input | |
parent | cf0c80049288d1029aee824bf975016c4201a3ef (diff) | |
download | zsh-49d34d00cdaf132f318700398bf42120ff1af8e7.tar.gz zsh-49d34d00cdaf132f318700398bf42120ff1af8e7.tar.bz2 zsh-49d34d00cdaf132f318700398bf42120ff1af8e7.zip |
fix(extract): fix conflict if compressed file has a folder of the same name
This change fixes the case where the compressed file (e.g. tools.tgz) only
contains a folder with the same name (e.g. tools) in its root folder.
tools.tgz:
|- tools
|- fileA.txt
|- fileB.txt
\- fileC.txt
In that case, the "smart" folder creation mechanism will extract the files in
a folder "tools", and this extraction folder will contain a single folder with
the same name.
Before this fix, the tool would try to move out the inside folder to the parent
one, but there would already be a folder named "tools", so it would generate a
conflict.
This change first renames the inside folder to a random string, and only then
it is moved outside and the old extraction folder is deleted.
Diffstat (limited to 'plugins/zsh-navigation-tools/n-list-input')
0 files changed, 0 insertions, 0 deletions