Leaked source code of windows server 2003
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

23 lines
491 B

  1. package URI::file::FAT;
  2. require URI::file::Win32;
  3. @ISA=qw(URI::file::Win32);
  4. sub fix_path
  5. {
  6. shift; # class
  7. for (@_) {
  8. # turn it into 8.3 names
  9. my @p = map uc, split(/\./, $_, -1);
  10. return if @p > 2; # more than 1 dot is not allowed
  11. @p = ("") unless @p; # split bug? (returns nothing when splitting "")
  12. $_ = substr($p[0], 0, 8);
  13. if (@p > 1) {
  14. my $ext = substr($p[1], 0, 3);
  15. $_ .= ".$ext" if length $ext;
  16. }
  17. }
  18. 1; # ok
  19. }
  20. 1;