From aa6d891d89e385f45f407da86e8f9c00e01fc4fd Mon Sep 17 00:00:00 2001 From: Alessandro Ferro Date: Wed, 26 Apr 2023 21:50:16 +0200 Subject: [PATCH] Small improvement --- dircomp.c | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/dircomp.c b/dircomp.c index 9f8b96b..278644b 100644 --- a/dircomp.c +++ b/dircomp.c @@ -105,6 +105,10 @@ 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);