summaryrefslogtreecommitdiffstats
path: root/lib/MDK/Common/File.pm
diff options
context:
space:
mode:
authorPascal Terjan <pterjan@mandriva.org>2010-06-02 09:56:19 +0000
committerPascal Terjan <pterjan@mandriva.org>2010-06-02 09:56:19 +0000
commit796884e0e279777167e83cb22e0c7893f14f39cb (patch)
tree494a7e46399c96fea8c737cd2d994d0d046169b1 /lib/MDK/Common/File.pm
parentc9caf51ec391bed1446ae5f27ed02c6283e7560f (diff)
downloadperl-MDK-Common-796884e0e279777167e83cb22e0c7893f14f39cb.tar
perl-MDK-Common-796884e0e279777167e83cb22e0c7893f14f39cb.tar.gz
perl-MDK-Common-796884e0e279777167e83cb22e0c7893f14f39cb.tar.bz2
perl-MDK-Common-796884e0e279777167e83cb22e0c7893f14f39cb.tar.xz
perl-MDK-Common-796884e0e279777167e83cb22e0c7893f14f39cb.zip
preserve sockets and pipes in cp_af1.2.25
Diffstat (limited to 'lib/MDK/Common/File.pm')
-rw-r--r--lib/MDK/Common/File.pm2
1 files changed, 1 insertions, 1 deletions
diff --git a/lib/MDK/Common/File.pm b/lib/MDK/Common/File.pm
index cacad59..06bd4fe 100644
--- a/lib/MDK/Common/File.pm
+++ b/lib/MDK/Common/File.pm
@@ -214,7 +214,7 @@ sub cp_with_option {
} elsif (-d $src) {
-d $dest or mkdir $dest, (stat($src))[2] or die "mkdir: can't create directory $dest: $!\n";
cp_with_option($option, glob_($src), $dest);
- } elsif ((-b $src || -c $src) && $keep_special) {
+ } elsif ((-b $src || -c $src || -S $src || -p $src) && $keep_special) {
my @stat = stat($src);
require MDK::Common::System;
MDK::Common::System::syscall_('mknod', $dest, $stat[2], $stat[6]) or die "mknod failed (dev $dest): $!";