aboutsummaryrefslogtreecommitdiff
path: root/coreutils/ls.c
diff options
context:
space:
mode:
authorRon Yorston <rmy@pobox.com>2020-08-28 11:08:24 +0100
committerRon Yorston <rmy@pobox.com>2020-08-28 11:08:24 +0100
commitadf41838bb4d33efc8069f9590f8e7ccc3978295 (patch)
treed2763525a85bc220a5cfce6491710d67521e1926 /coreutils/ls.c
parent5f696450596f34c80edb1bf866a876fcc8692334 (diff)
downloadbusybox-w32-adf41838bb4d33efc8069f9590f8e7ccc3978295.tar.gz
busybox-w32-adf41838bb4d33efc8069f9590f8e7ccc3978295.tar.bz2
busybox-w32-adf41838bb4d33efc8069f9590f8e7ccc3978295.zip
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.
Diffstat (limited to 'coreutils/ls.c')
-rw-r--r--coreutils/ls.c5
1 files changed, 5 insertions, 0 deletions
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)
957 continue; /* if only -A, skip . and .. but show other dotfiles */ 957 continue; /* if only -A, skip . and .. but show other dotfiles */
958 } 958 }
959 } 959 }
960#if ENABLE_PLATFORM_MINGW32
961 if (has_dos_drive_prefix(path) && path[2] == '\0')
962 fullname = xasprintf("%s%s", path, entry->d_name);
963 else
964#endif
960 fullname = concat_path_file(path, entry->d_name); 965 fullname = concat_path_file(path, entry->d_name);
961 cur = my_stat(fullname, bb_basename(fullname), 0); 966 cur = my_stat(fullname, bb_basename(fullname), 0);
962#if !ENABLE_PLATFORM_MINGW32 967#if !ENABLE_PLATFORM_MINGW32