From adf41838bb4d33efc8069f9590f8e7ccc3978295 Mon Sep 17 00:00:00 2001 From: Ron Yorston 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. --- coreutils/ls.c | 5 +++++ 1 file changed, 5 insertions(+) (limited to 'coreutils/ls.c') diff --git a/coreutils/ls.c b/coreutils/ls.c index ad754c14d..2f9338f19 100644 --- a/coreutils/ls.c +++ b/coreutils/ls.c @@ -957,6 +957,11 @@ static struct dnode **scan_one_dir(const char *path, unsigned *nfiles_p) continue; /* if only -A, skip . and .. but show other dotfiles */ } } +#if ENABLE_PLATFORM_MINGW32 + if (has_dos_drive_prefix(path) && path[2] == '\0') + fullname = xasprintf("%s%s", path, entry->d_name); + else +#endif fullname = concat_path_file(path, entry->d_name); cur = my_stat(fullname, bb_basename(fullname), 0); #if !ENABLE_PLATFORM_MINGW32 -- cgit v1.2.3-55-g6feb