From d1f94511dfd3d2aae60c93d46182b0d4ff453950 Mon Sep 17 00:00:00 2001 From: Pascal Rigaux Date: Tue, 6 Jul 2004 01:37:52 +0000 Subject: - when the directory is bad, go back to choose another directory instead of choosing another device (you can still use "Cancel" to choose another device) - list files in directory given, not the root directory of the device --- mdk-stage1/disk.c | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) (limited to 'mdk-stage1/disk.c') diff --git a/mdk-stage1/disk.c b/mdk-stage1/disk.c index f225e1e77..fd2ea3432 100644 --- a/mdk-stage1/disk.c +++ b/mdk-stage1/disk.c @@ -27,6 +27,7 @@ #include #include #include +#include #include "stage1.h" #include "frontend.h" #include "modules.h" @@ -224,6 +225,7 @@ static enum return_type try_with_device(char *dev_name) return try_with_device(dev_name); } + ask_dir: if (ask_from_entries_auto("Please enter the directory (or ISO image file) containing the " DISTRIB_NAME " Distribution install source.", questions_location, &answers_location, 24, questions_location_auto, NULL) != RETURN_OK) { @@ -237,16 +239,14 @@ static enum return_type try_with_device(char *dev_name) if (access(location_full, R_OK)) { stg1_error_message("Directory or ISO image file could not be found on partition.\n" - "Here's a short extract of the files in the root of the partition:\n" - "%s", extract_list_directory(disk_own_mount)); - umount(disk_own_mount); - return try_with_device(dev_name); + "Here's a short extract of the files in the directory %s:\n" + "%s", dirname(answers_location[0]), extract_list_directory(dirname(location_full))); + goto ask_dir; } results = try_with_directory(location_full, "disk", "disk-iso"); if (results != RETURN_OK) { - umount(disk_own_mount); - return try_with_device(dev_name); + goto ask_dir; } if (IS_RESCUE) -- cgit v1.2.1