diff options
author | Ron Yorston <rmy@pobox.com> | 2020-08-31 11:18:52 +0100 |
---|---|---|
committer | Ron Yorston <rmy@pobox.com> | 2020-08-31 15:04:42 +0100 |
commit | a20dad67289d23f965b4dfad45c32c593c8b7671 (patch) | |
tree | e151c5089354e6935ebee70abc61d7531c321f68 /win32/mingw.c | |
parent | adf41838bb4d33efc8069f9590f8e7ccc3978295 (diff) | |
download | busybox-w32-a20dad67289d23f965b4dfad45c32c593c8b7671.tar.gz busybox-w32-a20dad67289d23f965b4dfad45c32c593c8b7671.tar.bz2 busybox-w32-a20dad67289d23f965b4dfad45c32c593c8b7671.zip |
win32: make location of Unix-style absolute paths configurable
Previously busybox-w32 was enhanced so certain Unix-style absolute
paths of the form '/dir/file' were treated as being relative to the
system drive. (Notionally as reported by %SYSTEMDRIVE% but in fact
derived from the API call GetSystemDirectory().)
Make the location of such files configurable by the BB_SYSTEMROOT
environment variable.
- BB_SYSTEMROOT should probably only refer to a Windows-style
absolute path, but this isn't checked.
- Set BB_SYSTEMROOT using the Windows Control Panel or setx, not as
a shell variable: the shell itself won't see the environment
variable.
Diffstat (limited to 'win32/mingw.c')
-rw-r--r-- | win32/mingw.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/win32/mingw.c b/win32/mingw.c index 16e103b54..75f15aa30 100644 --- a/win32/mingw.c +++ b/win32/mingw.c | |||
@@ -1661,7 +1661,7 @@ const char *get_system_drive(void) | |||
1661 | } | 1661 | } |
1662 | } | 1662 | } |
1663 | 1663 | ||
1664 | return drive; | 1664 | return getenv("BB_SYSTEMROOT") ?: drive; |
1665 | } | 1665 | } |
1666 | 1666 | ||
1667 | /* Return pointer to system drive if path is of form '/file', else NULL */ | 1667 | /* Return pointer to system drive if path is of form '/file', else NULL */ |