OSDN Git Service

binary files were recognized as text files when comparing two same folder paths
authorTakashi Sawanaka <sdottaka@users.sourceforge.net>
Sat, 22 Oct 2016 12:57:31 +0000 (21:57 +0900)
committerTakashi Sawanaka <sdottaka@users.sourceforge.net>
Sat, 22 Oct 2016 12:57:31 +0000 (21:57 +0900)
Src/diffutils/src/io.c

index 530bc1a..8eaecaa 100644 (file)
@@ -1028,6 +1028,8 @@ read_files (filevec, pretend_binary, bin_file)
          filevec[1].count_lfs = filevec[0].count_lfs;
          filevec[1].count_crlfs = filevec[0].count_crlfs;
          filevec[1].count_zeros = filevec[0].count_zeros;
+      if (appears_binary || (bin_file && *bin_file > 0))
+        return 1;
       return 0;
     }