Subject: | File::Spec::Win32 - catpath() bug with UNC paths |
This issue is reported at perlbug #22148 at
http://rt.perl.org/rt3/Ticket/Display.html?id=22148. With UNC file
paths, a warning is generated and no path separator is placed between
the $volume and the $directory. In the perlbug a suggested solution is
included. I am also including a script that demonstrates the problem.
#!/usr/bin/perl -w
use strict;
use File::Spec::Win32;
use Test::More tests => 1;
my $volume = "\\\\myserver\\temp";
my $dir = "foo";
my $file = "bar.txt";
my $cat_path = File::Spec::Win32->catpath($volume, $dir, $file);
print "$cat_path\n";
is($cat_path, "\\\\myserver\\temp\\foo\\bar.txt");