1
0
mirror of https://github.com/ohmyzsh/ohmyzsh.git synced 2025-02-21 22:07:39 +08:00
Marc Cornellà 49d34d00cd
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.
2023-04-06 21:06:16 +02:00
..
2021-08-06 15:51:19 +02:00
2023-03-06 11:25:47 +01:00
2018-10-07 23:29:50 +02:00
2018-08-07 20:42:01 +02:00
2018-10-29 22:11:02 +01:00
2018-11-01 15:29:05 +01:00
2018-10-26 17:06:45 +02:00
2019-12-27 02:51:54 +01:00
2021-12-28 14:34:09 +01:00
2018-08-07 20:42:01 +02:00
2019-10-18 19:05:47 +02:00
2021-12-28 14:34:09 +01:00
2019-06-15 10:54:19 -07:00
2018-10-04 23:13:46 +02:00
2020-10-09 12:35:13 +02:00
2019-12-26 23:23:23 +01:00
2022-12-02 13:49:00 +01:00
2019-10-01 21:21:05 +02:00
2018-10-05 23:18:10 +02:00
2020-03-04 09:12:58 +01:00
2019-12-27 00:58:31 +01:00
2018-10-28 13:22:26 +01:00
2023-02-12 16:05:06 +01:00
2020-09-26 12:38:31 +02:00
2019-10-01 20:10:11 +02:00
2023-04-02 12:54:55 +02:00
2023-02-22 12:14:22 +01:00
2020-09-29 23:35:29 +02:00
2022-10-03 17:03:53 +02:00
2022-10-24 12:07:12 +02:00
2019-12-27 02:47:26 +01:00
2019-12-27 01:05:47 +01:00
2022-01-05 09:23:55 +01:00
2022-10-03 17:03:53 +02:00
2019-10-25 13:14:53 +02:00
2019-10-25 13:14:36 +02:00
2023-03-10 15:52:44 +01:00
2018-10-02 21:44:06 +02:00
2023-03-01 11:23:32 +01:00
2022-10-03 17:03:53 +02:00
2018-08-07 20:42:01 +02:00
2019-10-09 16:58:58 +02:00
2018-08-07 20:42:01 +02:00
2018-12-31 11:14:22 -08:00
2018-10-25 13:12:02 +02:00
2018-08-07 20:42:01 +02:00
2020-04-05 17:14:48 +02:00
2020-04-10 13:53:16 +02:00
2020-09-01 11:52:32 +02:00
2019-12-27 02:34:35 +01:00
2019-05-24 12:17:26 +02:00
2019-10-07 18:08:14 +02:00