summaryrefslogtreecommitdiffstats
path: root/mdk-stage1
diff options
context:
space:
mode:
authorPascal Rigaux <pixel@mandriva.com>2004-07-06 01:37:52 +0000
committerPascal Rigaux <pixel@mandriva.com>2004-07-06 01:37:52 +0000
commitd1f94511dfd3d2aae60c93d46182b0d4ff453950 (patch)
tree2b30ac1b512c6ba4451382b712dcb09151d10f43 /mdk-stage1
parenta2dd6ee2a734636299bf3014a147a8b065cc8b5f (diff)
downloaddrakx-d1f94511dfd3d2aae60c93d46182b0d4ff453950.tar
drakx-d1f94511dfd3d2aae60c93d46182b0d4ff453950.tar.gz
drakx-d1f94511dfd3d2aae60c93d46182b0d4ff453950.tar.bz2
drakx-d1f94511dfd3d2aae60c93d46182b0d4ff453950.tar.xz
drakx-d1f94511dfd3d2aae60c93d46182b0d4ff453950.zip
- 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
Diffstat (limited to 'mdk-stage1')
-rw-r--r--mdk-stage1/disk.c12
1 files changed, 6 insertions, 6 deletions
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 <sys/stat.h>
#include <fcntl.h>
#include <string.h>
+#include <libgen.h>
#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)