diff options
-rw-r--r-- | libbb/appletlib.c | 11 |
1 files changed, 6 insertions, 5 deletions
diff --git a/libbb/appletlib.c b/libbb/appletlib.c index 35f577b89..77a9c3b7d 100644 --- a/libbb/appletlib.c +++ b/libbb/appletlib.c | |||
@@ -768,13 +768,14 @@ static void install_links(const char *busybox, | |||
768 | { | 768 | { |
769 | char *fpc; | 769 | char *fpc; |
770 | const char *appname = applet_names; | 770 | const char *appname = applet_names; |
771 | const char *sd = custom_install_dir == NULL ? get_system_drive() : NULL; | 771 | const char *sd = NULL; |
772 | int i, rc; | 772 | int i, rc; |
773 | 773 | ||
774 | if (custom_install_dir && !is_directory(custom_install_dir, FALSE)) | 774 | if (custom_install_dir != NULL) { |
775 | bb_error_msg_and_die("'%s' is not a directory", custom_install_dir); | 775 | bb_make_directory(custom_install_dir, 0755, FILEUTILS_RECUR); |
776 | 776 | } | |
777 | if (custom_install_dir == NULL) { | 777 | else { |
778 | sd = get_system_drive(); | ||
778 | for (i=1; i<ARRAY_SIZE(install_dir); ++i) { | 779 | for (i=1; i<ARRAY_SIZE(install_dir); ++i) { |
779 | fpc = xasprintf("%s%s", sd ?: "", install_dir[i]); | 780 | fpc = xasprintf("%s%s", sd ?: "", install_dir[i]); |
780 | bb_make_directory(fpc, 0755, FILEUTILS_RECUR); | 781 | bb_make_directory(fpc, 0755, FILEUTILS_RECUR); |