diff options
author | Ron Yorston <rmy@pobox.com> | 2024-07-07 14:13:23 +0100 |
---|---|---|
committer | Ron Yorston <rmy@pobox.com> | 2024-07-07 14:13:23 +0100 |
commit | 9e0db7ef4a231cdf619e3fb7223ad1345b2adcf0 (patch) | |
tree | 7a3199596e673c319695b8b9d494035d4271cf46 /win32 | |
parent | a694cb601a92a1e4eded89f4c13793c9d12e33b6 (diff) | |
download | busybox-w32-9e0db7ef4a231cdf619e3fb7223ad1345b2adcf0.tar.gz busybox-w32-9e0db7ef4a231cdf619e3fb7223ad1345b2adcf0.tar.bz2 busybox-w32-9e0db7ef4a231cdf619e3fb7223ad1345b2adcf0.zip |
win32: code shrink system drive handling (2)
Now that get_system_drive() no longer returns a NULL pointer on
error chdir_system_drive() needs to check for an empty string
instead.
Diffstat (limited to 'win32')
-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 6544d11ad..273b8d840 100644 --- a/win32/mingw.c +++ b/win32/mingw.c | |||
@@ -2306,7 +2306,7 @@ int chdir_system_drive(void) | |||
2306 | const char *sd = get_system_drive(); | 2306 | const char *sd = get_system_drive(); |
2307 | int ret = -1; | 2307 | int ret = -1; |
2308 | 2308 | ||
2309 | if (sd) | 2309 | if (*sd) |
2310 | ret = chdir(auto_string(concat_path_file(sd, ""))); | 2310 | ret = chdir(auto_string(concat_path_file(sd, ""))); |
2311 | return ret; | 2311 | return ret; |
2312 | } | 2312 | } |