On Thu, Apr 17, 2014 at 08:07:10AM +0200, filip wrote:
> sub _unlink_or_rename { #XXX OS-SPECIFIC
> my ( $file, $tryhard, $installing )= @_;
>
> # _chmod( 0666, $file );
> my $unlink_count = 0;
> while (unlink $file) { $unlink_count++; }
> return $file if $unlink_count > 0;
> ...
>
> So it looks that they way it is used above is not so harmful afterall,
> but it stll seems like a strange construct. I can't immediately see what
> purpose it serves to change the permissions of a file before unlinking it.My guess is that it's somehow related to the portability of that functionality. Perl runs on a lot of weird platforms and I suppose a file's permissions may matter to unlink() on some of them. Either way, this bug should probably be re-assigned with Severity: minor to perl, or closed altogether... noah
signature.asc
Description: Digital signature

