diff --git a/test/compare_file.c b/test/compare_file.c index cd7cdbcd..8a450ba9 100644 --- a/test/compare_file.c +++ b/test/compare_file.c @@ -171,7 +171,7 @@ int Compare_2_files(char *adr1, char *adr2, char *adrc, int flag) differs= 1; } } - if(S_ISREG(s1.st_mode)) { + if(S_ISREG(s1.st_mode) && S_ISREG(s2.st_mode)) { fd1= open(adr1, O_RDONLY); if(fd1==-1) { printf("- %s : cannot open() : %s\n", adr1, strerror(errno));