mirror of https://github.com/xfarrow/dircomp.git
Update dircomp.c
This commit is contained in:
parent
28f5b6db95
commit
53ca658503
10
dircomp.c
10
dircomp.c
|
@ -102,10 +102,6 @@ bool analyze_directories(char* directory_to_analyze_1, char* directory_to_analyz
|
|||
struct dirent *element;
|
||||
DIR *directory1, *directory2;
|
||||
|
||||
if(strcmp(directory_to_analyze_1, directory_to_analyze_2) == 0){
|
||||
return true;
|
||||
}
|
||||
|
||||
directory1 = opendir(directory_to_analyze_1);
|
||||
directory2 = opendir(directory_to_analyze_2);
|
||||
|
||||
|
@ -118,6 +114,12 @@ bool analyze_directories(char* directory_to_analyze_1, char* directory_to_analyz
|
|||
return false;
|
||||
}
|
||||
|
||||
if(strcmp(directory_to_analyze_1, directory_to_analyze_2) == 0){
|
||||
free(directory_to_analyze_1);
|
||||
free(directory_to_analyze_2);
|
||||
return true;
|
||||
}
|
||||
|
||||
while ((element = readdir(directory1)) != NULL)
|
||||
{
|
||||
// Is file
|
||||
|
|
Loading…
Reference in New Issue