Skip to content

Commit 0b2d287

Browse files
committed
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>
1 parent d2456ea commit 0b2d287

File tree

1 file changed

+1
-7
lines changed

1 file changed

+1
-7
lines changed

winsup/cygwin/msys2_path_conv.cc

Lines changed: 1 addition & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -201,7 +201,7 @@ void ppl_convert(const char** from, const char* to, char** dst, const char* dste
201201

202202

203203
void find_end_of_posix_list(const char** to, int* in_string) {
204-
for (; **to != '\0' && (in_string ? (**to != *in_string) : **to != ' '); ++*to) {
204+
for (; **to != '\0' && (!in_string || **to != *in_string); ++*to) {
205205
}
206206

207207
if (**to == *in_string) {
@@ -302,12 +302,6 @@ const char* convert(char *dst, size_t dstlen, const char *src) {
302302
}
303303
continue;
304304
}
305-
306-
if (isspace(*srcit)) {
307-
//sub_convert(&srcbeg, &srcit, &dstit, dstend, &in_string);
308-
//srcbeg = srcit + 1;
309-
break;
310-
}
311305
}
312306

313307
sub_convert(&srcbeg, &srcit, &dstit, dstend, &in_string);

0 commit comments

Comments
 (0)