diff options
author | Pascal Terjan <pterjan@mandriva.org> | 2009-10-07 16:50:36 +0000 |
---|---|---|
committer | Pascal Terjan <pterjan@mandriva.org> | 2009-10-07 16:50:36 +0000 |
commit | 3019f58e316b2109e92fe7b7e2a06b3a2d1fc53c (patch) | |
tree | 14e63a52dce82401f44741e4c201c177f086e360 /lib/MDK/Common/File.pm | |
parent | 52f9d3c8ca854e87912787306d660200d8344645 (diff) | |
download | perl-MDK-Common-3019f58e316b2109e92fe7b7e2a06b3a2d1fc53c.tar perl-MDK-Common-3019f58e316b2109e92fe7b7e2a06b3a2d1fc53c.tar.gz perl-MDK-Common-3019f58e316b2109e92fe7b7e2a06b3a2d1fc53c.tar.bz2 perl-MDK-Common-3019f58e316b2109e92fe7b7e2a06b3a2d1fc53c.tar.xz perl-MDK-Common-3019f58e316b2109e92fe7b7e2a06b3a2d1fc53c.zip |
substInFile: do not unlink the symlink to recreate it later to the same target
Diffstat (limited to 'lib/MDK/Common/File.pm')
-rw-r--r-- | lib/MDK/Common/File.pm | 4 |
1 files changed, 0 insertions, 4 deletions
diff --git a/lib/MDK/Common/File.pm b/lib/MDK/Common/File.pm index cdcfcd9..c06294c 100644 --- a/lib/MDK/Common/File.pm +++ b/lib/MDK/Common/File.pm @@ -272,12 +272,9 @@ sub glob_ { sub substInFile(&@) { my ($f, $file) = @_; - my $linkdest; #- try hard to keep symlinks as they were set if (-l $file) { my $targetfile = readlink $file; - unlink $file; - $linkdest = $file; $file = $targetfile; } if (-s $file) { @@ -299,7 +296,6 @@ sub substInFile(&@) { select $old; eval { output($file, $_) }; } - $linkdest and symlink $file, $linkdest; } |