summaryrefslogtreecommitdiff
path: root/main.c
diff options
context:
space:
mode:
Diffstat (limited to 'main.c')
-rw-r--r--main.c18
1 files changed, 9 insertions, 9 deletions
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");
}
}
}