3 # Check whether there are naming conflicts when names are truncated to
4 # the DOSish case-ignoring 8.3 format, plus other portability no-nos.
7 my ($dir, $base, $ext) = ($_[0] =~ m!^(?:(.+)/)?([^/.]+)(?:\.([^/.]+))?$!);
8 my $file = $base . defined $ext ? ".$ext" : "";
9 $base = substr($base, 0, 8);
10 $ext = substr($ext, 0, 3) if defined $ext;
12 warn "$dir: directory name contains '.'\n";
14 if ($file =~ /[^A-Za-z0-9\._-]/) {
15 warn "$file: filename contains non-portable characters\n";
17 if (length $file > 30) {
18 warn "$file: filename longer than 30 characters\n";
21 return ($dir, defined $ext ? "$dir/$base.$ext" : "$dir/$base");
23 return ('.', defined $ext ? "$base.$ext" : $base);
29 if (open(MANIFEST, "MANIFEST")) {
38 print "$_: more than one dot\n";
41 my ($dir, $edt) = eight_dot_three($_);
42 ($dir, $edt) = map { lc } ($dir, $edt);
43 push @{$dir{$dir}->{$edt}}, $_;
46 die "$0: MANIFEST: $!\n";
49 for my $dir (sort keys %dir) {
50 for my $edt (keys %{$dir{$dir}}) {
51 my @files = @{$dir{$dir}->{$edt}};
53 print "@files: directory $dir conflict $edt\n";