Skip Menu |

This queue is for tickets about the File-Copy-Recursive CPAN distribution.

Report information
The Basics
Id: 111312
Status: resolved
Priority: 0/
Queue: File-Copy-Recursive

People
Owner: Nobody in particular
Requestors: yulian.matev [...] gmail.com
Cc:
AdminCc:

Bug Information
Severity: (no value)
Broken in: (no value)
Fixed in: (no value)



Subject: dircopy returns success when $new folder ends with " "
Date: Wed, 20 Jan 2016 22:33:31 +0200
To: bug-File-Copy-Recursive [...] rt.cpan.org
From: Yulian Matev <yulian.matev [...] gmail.com>
Hi, I am using Win7. By mistake I used a direcorory name that ends with blank " " : if( dircopy( "source_dir", "destination_dir " ) ) { } else { # trace error } and I found out that in this case : 1. dircopy returns success 2. directory "destination_dir" is created. 3. Nothing is copied inside "destination_dir" From my point of view a dircopy failure should be indicated in this case. Best regards, Yulian
Thanks!
Hello, I am unable to reproduce this[*]. Does this happen when using UNC paths by chance? If so, I suspect the space is a red herring; see if the github patch in rt 43328 makes it work for you. If not, could you add some debug statements to dircopy() to see at what point the space goes missing? I ask because the code is not modifying it directly so maybe something lower level is cleaning it off on windows. [*] perl -Mstrict -MFile::Copy::Recursive=dircopy -we 'dircopy("xyz", "derp ") or die $!' Does create "derp " and copy the contents of xyz into it.
Hello, I am unable to reproduce this[*]. Does this happen when using UNC paths by chance? If so, I suspect the space is a red herring; see if the github patch in rt 43328 makes it work for you. If not, could you add some debug statements to dircopy() to see at what point the space goes missing? I ask because the code is not modifying it directly so maybe something lower level is cleaning it off on windows. [*] perl -Mstrict -MFile::Copy::Recursive=dircopy -we 'dircopy("xyz", "derp ") or die $!' Does create "derp " and copy the contents of xyz into it.
This is likely addressed in v0.41. If it happens again we can revisit fresh via github.