[Subversion] / DadaFork / DADA / perllib / URI / file / FAT.pm  

View of /DadaFork/DADA/perllib/URI/file/FAT.pm

Parent Directory | Revision Log
Revision: 2253 - (download)
Wed Jan 10 14:34:26 2007 UTC (17 years, 3 months ago) by pje
File size: 468 byte(s)
Base version: DadaMail 2.10.12
package URI::file::FAT;

require URI::file::Win32;
@ISA=qw(URI::file::Win32);

sub fix_path
{
    shift; # class
    for (@_) {
	# turn it into 8.3 names
	my @p = map uc, split(/\./, $_, -1);
	return if @p > 2;     # more than 1 dot is not allowed
	@p = ("") unless @p;  # split bug? (returns nothing when splitting "")
	$_ = substr($p[0], 0, 8);
        if (@p > 1) {
	    my $ext = substr($p[1], 0, 3);
	    $_ .= ".$ext" if length $ext;
	}
    }
    1;  # ok
}

1;

cvs-admin@eby-sarna.com

Powered by ViewCVS 1.0-dev

ViewCVS and CVS Help