From d38c13b2fe1293b499312bb4cfd66a56108c4b5e Mon Sep 17 00:00:00 2001 From: bigfoot547 Date: Mon, 8 Jan 2024 12:17:20 -0600 Subject: WIP: JRE stuff --- src/cmd-instance.c | 12 ++---------- 1 file changed, 2 insertions(+), 10 deletions(-) (limited to 'src/cmd-instance.c') diff --git a/src/cmd-instance.c b/src/cmd-instance.c index 7a569e8..a09bffa 100644 --- a/src/cmd-instance.c +++ b/src/cmd-instance.c @@ -232,16 +232,8 @@ unsigned cmd_instance_remove(struct l2_context_node *ctx, char **args) /* delete the thing if it is necessary */ if (flag_remove) { - res = nftw(removepath, &cmd__delete_with_reckless_abandon, 128, FTW_DEPTH | FTW_PHYS); - switch (res) { - case -2: - CMD_FATAL0(CMD_MSG_INSTANCE_DELDIR_ERR("unreadable file/folder encountered")); - case -1: - CMD_FATAL0(CMD_MSG_INSTANCE_DELDIR_ERR("error walking file tree")); - case 0: - break; - default: - CMD_FATAL(CMD_MSG_INSTANCE_DELDIR_ERR("error removing a file: %s"), strerror(res)); + if (l2_launcher_rm_tree(removepath, 0) < 0) { + CMD_FATAL0("Could not delete instance directory."); } } -- cgit v1.2.3-70-g09d2