Skip Menu |

This queue is for tickets about the Kwiki-Test CPAN distribution.

Report information
The Basics
Id: 35762
Status: open
Priority: 0/
Queue: Kwiki-Test

People
Owner: Nobody in particular
Requestors: ANDK [...] cpan.org
Cc:
AdminCc:

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



Subject: File-Path 2.05 broke tests of Kwiki-Test 0.03
Subject says it all. I've opened the ticket http://rt.cpan.org//Ticket/Display.html?id=35761 for it.
On Sat May 10 03:58:20 2008, ANDK wrote: Show quoted text
> Subject says it all. I've opened the ticket > http://rt.cpan.org//Ticket/Display.html?id=35761 for it.
The problem is in lib/Test/Kwiki.pm, line 53: sub cleanup { io($self->base_dir)->rmtree unless $ENV{KWIKI_TEST_DIRTY}; } If I read this right, the current working directory is $self->base_dir, and you are asking to remove $self->base_dir while you are still in it. The File::Path 2.x code base contains code that originally came from the Debian project to prevent race conditions (people modifying the directory tree as it was being deleted). As a result, File::Path now manipulates the current working directory as it tracks the directories being removed. At the end of the run it restores the current working directory to what it was previously. And since we've just blown that directory away it cannot do that. The solution is to chdir to an existing location (that will continue to exist after rmtree() has completed) before removing the directory tree. Something as simple as chdir(File::Spec->updir) should do the trick in the present case. Thanks, David Landgren