projects
/
cleanmysourcetree.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
fix fd leak
[cleanmysourcetree.git]
/
cleanmysourcetree.c
diff --git
a/cleanmysourcetree.c
b/cleanmysourcetree.c
index
cc116ca
..
f989b72
100644
(file)
--- a/
cleanmysourcetree.c
+++ b/
cleanmysourcetree.c
@@
-96,11
+96,7
@@
static void add_files_recursive(const char *current_path) {
continue;
char file_path[strlen(current_path) + 1 + strlen(entry.d_name) + 1];
continue;
char file_path[strlen(current_path) + 1 + strlen(entry.d_name) + 1];
- if (strcmp(current_path, ".") == 0) {
- strcpy(file_path, entry.d_name);
- } else {
- sprintf(file_path, "%s/%s", current_path, entry.d_name);
- }
+ sprintf(file_path, "%s/%s", current_path, entry.d_name);
struct stat st;
if (lstat(file_path, &st))
struct stat st;
if (lstat(file_path, &st))
@@
-119,6
+115,7
@@
static void add_files_recursive(const char *current_path) {
}
}
add_dir(current_path);
}
}
add_dir(current_path);
+ closedir(d);
}
volatile bool child_quit = false;
}
volatile bool child_quit = false;