The question in my mind is: why is the test for file names on Win32 case sensitive? Last I checked, Windows doesn't differentiate between "d:" and "D:" On Feb 7, 2012 7:17 AM, "Nicholas Clark" <n...@ccl4.org> wrote:
> On Tue, Feb 07, 2012 at 12:30:07PM +0000, Nicholas Clark wrote: > > > and that calls File::Spec::Unix->catfile(), which on Win32 looks like > > this: > > Nick, you muppet. The code File::Spec::Unix->catfile() can't end up in > Win32's catfile. The cause is slightly earlier in _save_page > > # Remove Podroot from path > foreach my $podpath (@Podpath) { > my $beg_path = File::Spec->catdir($Podroot, $podpath); > if ($beg_path eq substr($modspec, 0, length($beg_path))) { > # Replace $Podroot/$podpath with $podpath > substr($modspec, 0, length($beg_path), $podpath); > last; > } > } > > and *that* above is a call to File::Spec::Win32::catdir() when on Win32, > > [code continues with the lines just below] > > > Pod::HTML seems to find the current directory by the same route. > > The cache is written from %Pages. Entries to %Pages are written here: > > > > # Convert path to unix style path > > $modspec = Unixify::unixify($modspec); > > > > my ($file, $dir) = fileparse($modspec, qr/\.[^.]*/); # strip .ext > > $Pages{$modname} = $dir.$file; > > > and catdir() tail calls into _canon_cat() > > > > and in turn, _canon_cat starts like this: > > > > sub _canon_cat # @path -> path > > { > > my ($first, @rest) = @_; > > > > my $volume = $first =~ s{ \A ([A-Za-z]:) ([\\/]?) }{}x # drive > letter > > ? ucfirst( $1 ).( $2 ? "\\" : "" ) > > : $first =~ s{ \A (?:\\\\|//) ([^\\/]+) > > (?: [\\/] ([^\\/]+) )? > > [\\/]? }{}xs # UNC > volume > > ? "\\\\$1".( defined $2 ? "\\$2" : "" )."\\" > > : $first =~ s{ \A [\\/] }{}x # root dir > > ? "\\" > > : ""; > > my $path = join "\\", $first, @rest; > > > > > > and *that*, I think is why "d:" becomes "D:" > > and I'm still not sure about: > > > *) why this didn't show up on the smoker. Is it possible on Win32 to > globally > > configure whether the reported name of the second HD is "d:" or "D:"? > > Nicholas Clark >