1
0
mirror of https://github.com/ohmyzsh/ohmyzsh.git synced 2025-02-21 20:12:11 +08:00
Marc Cornellà d47e1d65f6
fix(extract): safely remove extract directory
The previous code would remove the extract directory if the command failed.
This could be bad because we're not checking if the extract directory
already existed (since we're using `mkdir -p`), so it could be possible
that the extract operation failed, and we'd be removing a directory that
already existed and had files in it.

This change only removes the directory if there are no files in it, regardless
of whether the extract operation was successful or not. This is much safer.
2023-04-02 16:33:54 +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