… | |
… | |
1079 | =cut |
1079 | =cut |
1080 | |
1080 | |
1081 | sub maps($) { |
1081 | sub maps($) { |
1082 | my ($pl) = @_; |
1082 | my ($pl) = @_; |
1083 | |
1083 | |
|
|
1084 | $pl = ref $pl ? $pl->ob->name : $pl; |
|
|
1085 | |
1084 | my $files = aio_readdir playerdir $pl |
1086 | my $files = aio_readdir playerdir $pl |
1085 | or return; |
1087 | or return; |
1086 | |
1088 | |
1087 | my @paths; |
1089 | my @paths; |
1088 | |
1090 | |
1089 | for (@$files) { |
1091 | for (@$files) { |
1090 | utf8::decode $_; |
1092 | utf8::decode $_; |
1091 | next if /\.(?:pl|pst)$/; |
1093 | next if /\.(?:pl|pst)$/; |
1092 | next unless /^$PATH_SEP/o; |
1094 | next unless /^$PATH_SEP/o; |
1093 | |
1095 | |
1094 | push @paths, cf::map::normalise "~" . $pl->ob->name . "/" . $_; |
1096 | push @paths, cf::map::normalise "~$pl/$_"; |
1095 | } |
1097 | } |
1096 | |
1098 | |
1097 | \@paths |
1099 | \@paths |
1098 | } |
1100 | } |
1099 | |
1101 | |