From dc17ffe59abd2e4ec3dca0b0a660154148aec37a Mon Sep 17 00:00:00 2001 From: freesource Date: Fri, 21 Dec 2001 03:24:16 +0000 Subject: [PATCH] Before, if the sources created from the template had a symlink in them already, you couldn't just press create again .. (for instance for genext2f or uml_exclusively). This has been fixed. --- BootRoot/Yard.pm | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) diff --git a/BootRoot/Yard.pm b/BootRoot/Yard.pm index 484842e..01fb9f6 100644 --- a/BootRoot/Yard.pm +++ b/BootRoot/Yard.pm @@ -1265,9 +1265,12 @@ sub create_filesystem { my($floppy_file) = $mount_point . $file; mkpath(dirname($floppy_file)); info(1, "\tLink\t$floppy_file -> $target\n"); - symlink($target, $floppy_file) or - ($error = error("symlink($target, $floppy_file): $!\n")); - return "ERROR"if $error && $error eq "ERROR"; + # This allows previous symlinks to exist sources + if ( !-e $floppy_file ) { + symlink($target, $floppy_file) or + ($error = error("symlink($target, $floppy_file): $!\n")); + return "ERROR"if $error && $error eq "ERROR"; + } delete $Included{$file}; # Get rid of it so next pass doesn't copit } elsif (-d $file) {