From a9a967642be399d21211519751e9a84b217fcd1d Mon Sep 17 00:00:00 2001 From: Abdellah El Morabit Date: Tue, 25 Feb 2025 20:10:31 +0100 Subject: fixed some bad code by calling it bad code in a coment --- main.c | 18 +++++++++--------- 1 file changed, 9 insertions(+), 9 deletions(-) (limited to 'main.c') diff --git a/main.c b/main.c index d8accff..2b2e599 100644 --- a/main.c +++ b/main.c @@ -162,15 +162,15 @@ void remove_dir(const char *path) { } else { - - while ((entry = readdir(dP)) != NULL && rmdir(path) != 0){ - if (strcmp(entry->d_name, "." ) == 0 || strcmp(entry->d_name, "..")== 0){ - printf("%p",entry->d_name); - continue; - } - else if (remove(entry->d_name) != 0) { - printf("%p", entry->d_name); - perror("failed to delete the directory 02"); +// bad code, should be rewritten dont look at it!!! + while ((entry = readdir(dP)) != NULL && rmdir(path) != 0){ + if (strcmp(entry->d_name, "." ) == 0 || strcmp(entry->d_name, "..")== 0){ + printf("%p",entry->d_name); + continue; + } + else if (remove(entry->d_name) != 0) { + printf("%p", entry->d_name); + perror("failed to delete the directory 02"); } } } -- cgit v1.2.3-70-g09d2