mirror of
https://github.com/xfarrow/dircomp.git
synced 2025-06-05 21:49:19 +02:00
Update dircomp.c
This commit is contained in:
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
|
||||
|
Reference in New Issue
Block a user