Subject: | Deletes .DS_Store files during mirroring |
The CPAN mirror script deletes .DS_Store files that MacOS uses to keep Finder information in (e.g. the x,y coords of the file in the finder display.) Attached is a patch that prevents the mirroring from incorrectly deleting these files.
(This problem is on stock perl (5.8.1-RC3) on Mac OS X 10.3.something_or_other)
Only in CPAN-Mini-mark: Makefile
Only in CPAN-Mini-mark: blib
diff -ur CPAN-Mini-0.16/lib/CPAN/Mini.pm CPAN-Mini-mark/lib/CPAN/Mini.pm
--- CPAN-Mini-0.16/lib/CPAN/Mini.pm Wed Sep 8 02:46:27 2004
+++ CPAN-Mini-mark/lib/CPAN/Mini.pm Wed Sep 22 11:45:33 2004
@@ -190,11 +190,17 @@
=cut
+# files that are allowed to remain in the mirror
+our %allowed_files = map { $_ => 1 } (
+ ".DS_Store",
+);
+
sub clean_unmirrored {
my $self = shift;
find sub {
return unless -f and not $self->{mirrored}{$File::Find::name};
+ return if $allowed_files{$_};
$self->trace("$File::Find::name ... removed\n");
unlink $_ or warn "Cannot remove $File::Find::name: $!";
}, $self->{local};
Only in CPAN-Mini-mark: pm_to_blib