diff options
author | Pascal Rigaux <pixel@mandriva.com> | 2004-07-06 01:39:11 +0000 |
---|---|---|
committer | Pascal Rigaux <pixel@mandriva.com> | 2004-07-06 01:39:11 +0000 |
commit | efa11abac78f71e0d119dada150d2ef8c9f593a3 (patch) | |
tree | e1af70cb1098576735d41227ad85afe3110b8a8b /mdk-stage1/directory.c | |
parent | d1f94511dfd3d2aae60c93d46182b0d4ff453950 (diff) | |
download | drakx-backup-do-not-use-efa11abac78f71e0d119dada150d2ef8c9f593a3.tar drakx-backup-do-not-use-efa11abac78f71e0d119dada150d2ef8c9f593a3.tar.gz drakx-backup-do-not-use-efa11abac78f71e0d119dada150d2ef8c9f593a3.tar.bz2 drakx-backup-do-not-use-efa11abac78f71e0d119dada150d2ef8c9f593a3.tar.xz drakx-backup-do-not-use-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.c | 5 |
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 |