Skip Menu |

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

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

People
Owner: Nobody in particular
Requestors: cpan [...] clotho.com
Cc:
AdminCc:

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



Subject: fcopy to dir causes chmod on dir, not on file
If the second argument to fcopy() is a directory, then the source file's mode is mistakenly applied to the destination directory, not to the destination file. In detail: % touch file % mkdir dir % ls -ld file dir drwxr-xr-x 2 chris wheel 68 Apr 11 14:47 dir -rw-r--r-- 1 chris wheel 0 Apr 11 14:47 file % perl -le'use File::Copy::Recursive "fcopy";fcopy "file","dir"' % ls -ld file dir drw-r--r-- 3 chris wheel 102 Apr 11 14:47 dir -rw-r--r-- 1 chris wheel 0 Apr 11 14:47 file The error is that after fcopy, the dir has lost its execute bits due to a misapplied chmod. Chris
Subject: Re: [rt.cpan.org #18667] fcopy to dir causes chmod on dir, not on file
Date: Tue, 11 Apr 2006 15:28:23 -0500
To: bug-File-Copy-Recursive [...] rt.cpan.org
From: SimpleMood Webmaster <webmaster [...] simplemood.com>
Show quoted text
> If the second argument to fcopy() is a directory, then the source > file's > mode is mistakenly applied to the destination directory, not to the > destination file. In detail: > > % touch file > % mkdir dir > % ls -ld file dir > drwxr-xr-x 2 chris wheel 68 Apr 11 14:47 dir > -rw-r--r-- 1 chris wheel 0 Apr 11 14:47 file > % perl -le'use File::Copy::Recursive "fcopy";fcopy "file","dir"' > % ls -ld file dir > drw-r--r-- 3 chris wheel 102 Apr 11 14:47 dir > -rw-r--r-- 1 chris wheel 0 Apr 11 14:47 file > > The error is that after fcopy, the dir has lost its execute bits > due to > a misapplied chmod.
Thanks for the detailed info, no need to annotate the POD with the bug's existence since the bug list is public and linke dot the module and I'll have it resolved shortly. Please remember to remove the notation once the bug is closed or better yet do not annotate the POD that a bug report exists since a bug report is temporary.
Fixed in 0.20, uploading immediately after posting this: multivac:~ dmuey$ ls -ld dir/ file drwxr-xr-x 2 dmuey dmuey 68 Apr 11 15:39 dir/ -rw-r--r-- 1 dmuey dmuey 0 Apr 11 15:39 file multivac:~ dmuey$ ls -l dir/ multivac:~ dmuey$ perl -le'use File::Copy::Recursive "fcopy";fcopy "file","dir"' multivac:~ dmuey$ ls -l dir/ total 0 -rw-r--r-- 1 dmuey dmuey 0 Apr 11 15:41 file multivac:~ dmuey$ ls -ld dir/ file drwxr-xr-x 3 dmuey dmuey 102 Apr 11 15:41 dir/ -rw-r--r-- 1 dmuey dmuey 0 Apr 11 15:39 file multivac:~ dmuey$