summaryrefslogtreecommitdiffstats
path: root/mdk-stage1
diff options
context:
space:
mode:
authorOlivier Blin <oblin@mandriva.org>2005-03-22 17:37:40 +0000
committerOlivier Blin <oblin@mandriva.org>2005-03-22 17:37:40 +0000
commitc88baab41c58bac6dce5e2995e9b1508373bff4f (patch)
tree12946c42f6929413c8becaf242b9ebdf22e15171 /mdk-stage1
parent8f7148397f07b079a3d64d135dc5acd8634fc2e5 (diff)
downloaddrakx-c88baab41c58bac6dce5e2995e9b1508373bff4f.tar
drakx-c88baab41c58bac6dce5e2995e9b1508373bff4f.tar.gz
drakx-c88baab41c58bac6dce5e2995e9b1508373bff4f.tar.bz2
drakx-c88baab41c58bac6dce5e2995e9b1508373bff4f.tar.xz
drakx-c88baab41c58bac6dce5e2995e9b1508373bff4f.zip
dirname may modify the string, so copy it first
Diffstat (limited to 'mdk-stage1')
-rw-r--r--mdk-stage1/disk.c4
1 files changed, 3 insertions, 1 deletions
diff --git a/mdk-stage1/disk.c b/mdk-stage1/disk.c
index 9a4e97166..1579ddaa4 100644
--- a/mdk-stage1/disk.c
+++ b/mdk-stage1/disk.c
@@ -93,9 +93,11 @@ static enum return_type try_with_device(char *dev_name)
strcat(location_full, answers_location[0]);
if (access(location_full, R_OK)) {
+ char * path = strdup(answers_location[0]);
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 directory %s:\n"
- "%s", dirname(answers_location[0]), extract_list_directory(dirname(location_full)));
+ "%s", dirname(path), extract_list_directory(dirname(location_full)));
+ free(path);
goto ask_dir;
}