aboutsummaryrefslogtreecommitdiff
path: root/include
diff options
context:
space:
mode:
authorRon Yorston <rmy@pobox.com>2019-03-06 12:00:50 +0000
committerRon Yorston <rmy@pobox.com>2019-03-06 12:00:50 +0000
commit585d17d262efabce4a9a87f33f531ef9ab7c0e36 (patch)
treee9b5d4bffaf1d8962d3c3d5e4529d7b87f831c7c /include
parent5c5197df8668ba58ec7799ccc418d124a6c6a49e (diff)
downloadbusybox-w32-585d17d262efabce4a9a87f33f531ef9ab7c0e36.tar.gz
busybox-w32-585d17d262efabce4a9a87f33f531ef9ab7c0e36.tar.bz2
busybox-w32-585d17d262efabce4a9a87f33f531ef9ab7c0e36.zip
win32: canonicalize path in chdir(2)
Provide an implementation of chdir(2) which canonicalizes the path to resolve symlinks. Otherwise changing to a symlinked directory confuses 'ls -l' because it thinks '.' is a link rather than a directory. OTOH, using 'cd' in the shell to change to a symlinked directory now results in a mismatch between the shell's idea of where we are and what's displayed in the prompt. But upstream BusyBox does that too so it must be OK.
Diffstat (limited to 'include')
-rw-r--r--include/mingw.h2
1 files changed, 2 insertions, 0 deletions
diff --git a/include/mingw.h b/include/mingw.h
index b5324e49b..9bc5eb018 100644
--- a/include/mingw.h
+++ b/include/mingw.h
@@ -271,9 +271,11 @@ mode_t mingw_umask(mode_t mode);
271IMPL(fchmod,int,0,int fildes UNUSED_PARAM, mode_t mode UNUSED_PARAM); 271IMPL(fchmod,int,0,int fildes UNUSED_PARAM, mode_t mode UNUSED_PARAM);
272NOIMPL(fchown,int fd UNUSED_PARAM, uid_t uid UNUSED_PARAM, gid_t gid UNUSED_PARAM); 272NOIMPL(fchown,int fd UNUSED_PARAM, uid_t uid UNUSED_PARAM, gid_t gid UNUSED_PARAM);
273int mingw_mkdir(const char *path, int mode); 273int mingw_mkdir(const char *path, int mode);
274int mingw_chdir(const char *path);
274int mingw_chmod(const char *path, int mode); 275int mingw_chmod(const char *path, int mode);
275 276
276#define mkdir mingw_mkdir 277#define mkdir mingw_mkdir
278#define chdir mingw_chdir
277#define chmod mingw_chmod 279#define chmod mingw_chmod
278 280
279#if ENABLE_LFS && !defined(__MINGW64_VERSION_MAJOR) 281#if ENABLE_LFS && !defined(__MINGW64_VERSION_MAJOR)