MSYS2-packages/msys2-runtime-3.3/0044-Stop-assuming-that-there-are-no-spaces-in-POSIX-styl.patch

45 lines
1.6 KiB
Diff

From c86ff309dd42a57dc2f1113b1266e36c01b8c97f Mon Sep 17 00:00:00 2001
From: Johannes Schindelin <johannes.schindelin@gmx.de>
Date: Wed, 18 Feb 2015 10:45:01 +0000
Subject: [PATCH 44/N] Stop assuming that there are no spaces in POSIX-style
paths
Git's test suite most prominently sports a POSIX path with a space in
it: the tests are executed in directories whose names have the form
'trash directory.t0123-blub'. Therefore, we *must* handle those names
correctly.
This fix makes Git's t1504-ceiling-dirs.sh pass.
Signed-off-by: Johannes Schindelin <johannes.schindelin@gmx.de>
---
winsup/cygwin/msys2_path_conv.cc | 8 +-------
1 file changed, 1 insertion(+), 7 deletions(-)
diff --git a/winsup/cygwin/msys2_path_conv.cc b/winsup/cygwin/msys2_path_conv.cc
index b8f280b..ebf47d6 100644
--- a/winsup/cygwin/msys2_path_conv.cc
+++ b/winsup/cygwin/msys2_path_conv.cc
@@ -201,7 +201,7 @@ void ppl_convert(const char** from, const char* to, char** dst, const char* dste
void find_end_of_posix_list(const char** to, int* in_string) {
- for (; **to != '\0' && (in_string ? (**to != *in_string) : **to != ' '); ++*to) {
+ for (; **to != '\0' && (!in_string || **to != *in_string); ++*to) {
}
if (**to == *in_string) {
@@ -301,12 +301,6 @@ const char* convert(char *dst, size_t dstlen, const char *src) {
}
continue;
}
-
- if (isspace(*srcit)) {
- //sub_convert(&srcbeg, &srcit, &dstit, dstend, &in_string);
- //srcbeg = srcit + 1;
- break;
- }
}
sub_convert(&srcbeg, &srcit, &dstit, dstend, &in_string);