On Mon, Aug 27, 2012 at 06:19:58PM +0100, Steve Hay wrote: > The attached patch fixes a failure in the new File::Copy tests added > by 43ddfa5614 (the ok(!copy...) test passes, but the > like($warn_message...) test fails because the code which sets the > expected warning isn't run on Windows). > > However, I haven't applied it because it doesn't seem correct to me: > wouldn't it be more appropriate in this case for the copy to > "succeed", like the _eq($from, $to) case a few lines earlier in > Copy.pm does? > > That can be achieved by changing the new return 0 which this patch > adds to return 1 and adjusting the test script accordingly, although > that would involve the test script replicating the same d_symlink / > d_readlink / d_link logic as Copy.pm has, which doesn't seem ideal > (unless *that* case is also changed to return 1...). Sorry for the test failure, I thought I'd tested on Win32 back when I originally wrote it, so only tested on Linux this time around. copy() is documented to fail when you try to copy a file over itself, and it does in several cases. 754f2cd0b changed it to the current inconsistent behaviour. TonyThread Previous | Thread Next