From adf41838bb4d33efc8069f9590f8e7ccc3978295 Mon Sep 17 00:00:00 2001
From: Ron Yorston <rmy@pobox.com>
Date: Fri, 28 Aug 2020 11:08:24 +0100
Subject: ash, ls: improve support for 'c:path'

Revert commit 249f68e3c (win32: append '/' to bare drive name in
opendir).

Instead add better handling for paths of the form 'c:path' to ls
and expmeta() in ash.

Adds 64 bytes.
---
 shell/ash.c | 4 ++++
 1 file changed, 4 insertions(+)

(limited to 'shell')

diff --git a/shell/ash.c b/shell/ash.c
index 1d7d916da..1f57c2d7e 100644
--- a/shell/ash.c
+++ b/shell/ash.c
@@ -8293,6 +8293,10 @@ expmeta(exp_t *exp, char *name, unsigned name_len, unsigned expdir_len)
 
 	metaflag = 0;
 	start = name;
+#if ENABLE_PLATFORM_MINGW32
+	if (expdir_len == 0 && has_dos_drive_prefix(start) && start[2] != '/')
+		start += 2;
+#endif
 	for (p = name; esc = 0, *p; p += esc + 1) {
 		if (*p == '*' || *p == '?')
 			metaflag = 1;
-- 
cgit v1.2.3-55-g6feb