From: John Napiorkowski Date: Fri, 9 Mar 2012 06:16:28 +0000 (-0500) Subject: really fixed missing path problem X-Git-Tag: 1.001015~1 X-Git-Url: http://git.shadowcat.co.uk/gitweb/gitweb.cgi?a=commitdiff_plain;h=ed4a576a782e7c3a31447e187e128853a69f7a2a;p=dbsrgits%2FDBIx-Class-Fixtures.git really fixed missing path problem --- diff --git a/lib/DBIx/Class/Fixtures/External/File.pm b/lib/DBIx/Class/Fixtures/External/File.pm index 4277e7b..cb13965 100644 --- a/lib/DBIx/Class/Fixtures/External/File.pm +++ b/lib/DBIx/Class/Fixtures/External/File.pm @@ -30,9 +30,9 @@ sub backup { sub restore { my ($class, $key, $content, $args) = @_; - my ($vol, $directory, $file) = splitpath catfile($args->{path}, $key); + my $path = catfile($args->{path}, $key); + my ($vol, $directory, $file) = splitpath($path); mkpath($directory) unless -d $directory; - my $path = catfile($vol, $directory, $file); $class->_save($path, $content); } diff --git a/t/18-extra.t b/t/18-extra.t index 2bbb0e1..fc20aaa 100644 --- a/t/18-extra.t +++ b/t/18-extra.t @@ -56,6 +56,6 @@ ok -e $key, 'File Restored'; done_testing; END { - rmtree 't/var/files'; - rmtree 't/var/fixtures/photos'; + rmtree 't/var/files'; + rmtree 't/var/fixtures/photos'; }