in reply to File::Copy::Recursive dircopy side effect

It is a simple bug in how File::Copy::Recursive uses File::Spec. Look at "sub pathmk" in Recursive.pm.

It does @parts = File::Spec->splitdir($path) and joins those parts back together one-at-at-time using File::Spec->catdir(). That process turns \\server\d\dir into \server\d\dir because splitdir returns ( '', '', 'server', 'd', 'dir' ) but File::Spec->catdir('','') returns '\\' (the string \) not '\\\\' (the string \\).

- tye        

Replies are listed 'Best First'.
Re^2: File::Copy::Recursive dircopy side effect (File::Spec)
by niewczyk (Initiate) on Feb 17, 2014 at 16:19 UTC
    Thanks. I see and understand the issue. Other than removing the side-effect created directories, is there any known fix for the File::Spec module? Thanks for your help.

      Fixing the bug is a rather simple matter of programming. When you get the fix working, then you can even submit it as part of your bug report so that the module eventually gets updated with the fix on CPAN.

      - tye