From 9d596234ba111ec5899dacc466d30a6b612e4262 Mon Sep 17 00:00:00 2001 From: Olivier Blin Date: Wed, 23 Jun 2004 02:37:52 +0000 Subject: revert the workaround on stat() now that it works on large files --- mdk-stage1/directory.c | 11 +++++------ 1 file changed, 5 insertions(+), 6 deletions(-) (limited to 'mdk-stage1/directory.c') diff --git a/mdk-stage1/directory.c b/mdk-stage1/directory.c index 658a209c6..00c6bb872 100644 --- a/mdk-stage1/directory.c +++ b/mdk-stage1/directory.c @@ -126,12 +126,7 @@ enum return_type try_with_directory(char *directory, char *method_live, char *me } #endif - /* warning, stat() fails on large files (like DVD ISO images) */ - if (!stat(location_full, &statbuf) && S_ISDIR(statbuf.st_mode)) { - log_message("assuming %s is a mirror tree", location_full); - symlink(location_full, IMAGE_LOCATION); - add_to_env("METHOD", method_live); - } else { + if (!stat(location_full, &statbuf) && !S_ISDIR(statbuf.st_mode)) { log_message("%s exists and is not a directory, assuming this is an ISO image", location_full); if (lomount(location_full, IMAGE_LOCATION, &loopdev, 0)) { stg1_error_message("Could not mount file %s as an ISO image of the " DISTRIB_NAME " Distribution.", location_full); @@ -139,6 +134,10 @@ 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(location_full, IMAGE_LOCATION); + add_to_env("METHOD", method_live); } #ifndef MANDRAKE_MOVE if (IS_SPECIAL_STAGE2 || ramdisk_possible()) { -- cgit v1.2.1