Skip Menu |

This queue is for tickets about the Code-DRY CPAN distribution.

Report information
The Basics
Id: 129533
Status: resolved
Priority: 0/
Queue: Code-DRY

People
Owner: HEXCODER [...] cpan.org
Requestors: SLAFFAN [...] cpan.org
Cc:
AdminCc:

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



Subject: Only scans first file in file list on Windows
On Windows, the if-exists condition near line 353 results in all but the first file being skipped. This is due to @statresult having a value of 0 for the inode slot on WIndows. The simplest approach is to skip the check on Windows, or alternately not assign to %filename2inode on Windows. An example of the first option is below. Regards, Shawn. if (0 < $#statresult) { my $inode = $statresult[1]; # inode if ($^O ne 'MSWin32' && exists $filename2inode{$inode}) { $file = undef; next; # avoid hard and symbolic links } $filename2inode{$inode} = undef; # inode }
Am Fr 10. Mai 2019, 19:52:35, SLAFFAN schrieb: Show quoted text
> On Windows, the if-exists condition near line 353 results in all but > the first file being skipped. This is due to @statresult having a > value of 0 for the inode slot on WIndows.
Thanks! I knew that once but had forgotten to test this on Windows prior to release. BTW: It works on cygwin (they seem to have artificial inodes there). Will be fixed in version 0.09 Show quoted text
> The simplest approach is to skip the check on Windows, or alternately > not assign to %filename2inode on Windows. An example of the first > option is below. > > Regards, > Shawn. > > > if (0 < $#statresult) { > my $inode = $statresult[1]; # inode > if ($^O ne 'MSWin32' && exists $filename2inode{$inode}) { > $file = undef; > next; # avoid hard and symbolic links > } > $filename2inode{$inode} = undef; # inode > }