From efa11abac78f71e0d119dada150d2ef8c9f593a3 Mon Sep 17 00:00:00 2001 From: Pascal Rigaux Date: Tue, 6 Jul 2004 01:39:11 +0000 Subject: doing basename is dumb (is blino too?), really make the symlink relative --- mdk-stage1/directory.c | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) (limited to 'mdk-stage1/directory.c') 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 -- cgit v1.2.1