29 lines
1.1 KiB
Diff
29 lines
1.1 KiB
Diff
From fbadc3ad520d40b45d39699abe09460ad6263a53 Mon Sep 17 00:00:00 2001
|
|
From: Christoph Reiter <reiter.christoph@gmail.com>
|
|
Date: Sun, 9 Apr 2023 16:34:45 +0200
|
|
Subject: [PATCH 41/N] fixup! Add functionality for converting UNIX paths in
|
|
arguments and environment variables to Windows form for native Win32
|
|
applications.
|
|
|
|
---
|
|
winsup/cygwin/msys2_path_conv.cc | 6 ++++--
|
|
1 file changed, 4 insertions(+), 2 deletions(-)
|
|
|
|
diff --git a/winsup/cygwin/msys2_path_conv.cc b/winsup/cygwin/msys2_path_conv.cc
|
|
index 9e16d0d..2bdf0ae 100644
|
|
--- a/winsup/cygwin/msys2_path_conv.cc
|
|
+++ b/winsup/cygwin/msys2_path_conv.cc
|
|
@@ -341,8 +341,10 @@ path_type find_path_start_and_type(const char** src, int recurse, const char* en
|
|
|
|
if (*it == '\0' || it == end) return NONE;
|
|
|
|
- if (!isalnum(*it) && *it != '/' && *it != '\\' && *it != ':' && *it != '-' && *it != '.') {
|
|
- return find_path_start_and_type(move(src, 1), true, end);
|
|
+ while (!isalnum(*it) && *it != '/' && *it != '\\' && *it != ':' && *it != '-' && *it != '.') {
|
|
+ recurse = true;
|
|
+ it = ++*src;
|
|
+ if (it == end || *it == '\0') return NONE;
|
|
}
|
|
|
|
path_type result = NONE;
|