20 lines
797 B
Diff
20 lines
797 B
Diff
--- src/coreutils-8.21/src/md5sum.c.orig 2013-07-11 16:13:02.000000000 +0400
|
|
+++ src/coreutils-8.21/src/md5sum.c 2013-07-12 16:36:12.000000000 +0400
|
|
@@ -394,6 +394,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;
|
|
|