summaryrefslogtreecommitdiffstats
path: root/mdk-stage1/directory.c
diff options
context:
space:
mode:
authorPascal Rigaux <pixel@mandriva.com>2004-07-06 01:39:11 +0000
committerPascal Rigaux <pixel@mandriva.com>2004-07-06 01:39:11 +0000
commitefa11abac78f71e0d119dada150d2ef8c9f593a3 (patch)
treee1af70cb1098576735d41227ad85afe3110b8a8b /mdk-stage1/directory.c
parentd1f94511dfd3d2aae60c93d46182b0d4ff453950 (diff)
downloaddrakx-efa11abac78f71e0d119dada150d2ef8c9f593a3.tar
drakx-efa11abac78f71e0d119dada150d2ef8c9f593a3.tar.gz
drakx-efa11abac78f71e0d119dada150d2ef8c9f593a3.tar.bz2
drakx-efa11abac78f71e0d119dada150d2ef8c9f593a3.tar.xz
drakx-efa11abac78f71e0d119dada150d2ef8c9f593a3.zip
doing basename is dumb (is blino too?), really make the symlink relative
Diffstat (limited to 'mdk-stage1/directory.c')
-rw-r--r--mdk-stage1/directory.c5
1 files changed, 3 insertions, 2 deletions
diff --git a/mdk-stage1/directory.c b/mdk-stage1/directory.c
index 30f3b29a5..f71cf8ad4 100644
--- a/mdk-stage1/directory.c
+++ b/mdk-stage1/directory.c
@@ -137,8 +137,9 @@ enum return_type try_with_directory(char *directory, char *method_live, char *me
add_to_env("ISOPATH", location_full);
add_to_env("METHOD", method_iso);
} else {
- log_message("assuming %s is a mirror tree", location_full);
- symlink(basename(location_full), IMAGE_LOCATION);
+ int offset = strncmp(location_full, IMAGE_LOCATION_DIR, sizeof(IMAGE_LOCATION_DIR) - 1) == 0 ? sizeof(IMAGE_LOCATION_DIR) - 1 : 0;
+ log_message("assuming %s is a mirror tree", location_full + offset);
+ symlink(location_full + offset, IMAGE_LOCATION);
add_to_env("METHOD", method_live);
}
#ifndef MANDRAKE_MOVE