diff options
| author | Abdellah El Morabit <nsrddyn@gmail.com> | 2025-02-25 18:24:31 +0100 |
|---|---|---|
| committer | Abdellah El Morabit <nsrddyn@gmail.com> | 2025-02-25 18:24:31 +0100 |
| commit | eafff8845db6c81384beee5d72ac30a4c9cd1972 (patch) | |
| tree | 98993e440a79091035d7bfb0d2cd8a2b6de64b9b /main.c | |
| parent | e20e3f22e9218dc99cf7609687051669b9c445ae (diff) | |
made the readme file
Diffstat (limited to 'main.c')
| -rw-r--r-- | main.c | 3 |
1 files changed, 3 insertions, 0 deletions
@@ -159,7 +159,9 @@ void remove_dir(const char *path) { if (dP == NULL) { perror("failed to open the directory to delete the files recursively"); + } + else { while ((entry = readdir(dP)) != NULL && rmdir(path) != 0){ if (strcmp(entry->d_name, "." ) == 0 || strcmp(entry->d_name, "..")== 0){ @@ -169,6 +171,7 @@ void remove_dir(const char *path) { else if (remove(entry->d_name) != 0) { printf("%p", entry->d_name); perror("failed to delete the directory 02"); + } } } printf("%p", dP); |
