21 lines
799 B
Diff
21 lines
799 B
Diff
diff -Naur a/src/md5sum.c b/src/md5sum.c
|
|
--- a/src/md5sum.c 2014-07-20 20:19:43.269800000 +0400
|
|
+++ b/src/md5sum.c 2014-07-20 20:19:48.714200000 +0400
|
|
@@ -392,6 +392,16 @@
|
|
significant -- that includes leading and trailing white space. */
|
|
*file_name = &s[i];
|
|
|
|
+#if __CYGWIN__
|
|
+ /* But on cygwin, where \r is only permitted on managed mounts (and is
|
|
+ relatively rare anyways), strip it from the line end since older
|
|
+ cygwin releases (which includes practically all msys1 releases)
|
|
+ of coreutils mistakenly output md5sums in text mode.
|
|
+ \r is not a legal character for use in file names on W32 anyway. */
|
|
+ if (s[s_len - 1] == '\r')
|
|
+ s[--s_len] = '\0';
|
|
+#endif /* __CYGWIN__ */
|
|
+
|
|
if (escaped_filename)
|
|
return filename_unescape (&s[i], s_len - i) != NULL;
|
|
|