fixed bug causing errors when fixture directory had no subdirs
Luke Saunders [Thu, 30 Apr 2009 23:48:14 +0000 (23:48 +0000)]
lib/DBIx/Class/Fixtures.pm

index 3cbe68b..38470ed 100644 (file)
@@ -999,7 +999,6 @@ sub populate {
   
   $self->msg("\nimporting fixtures");
   my $tmp_fixture_dir = dir($fixture_dir, "-~populate~-" . $<);
-
   my $version_file = file($fixture_dir, '_dumper_version');
 #  DBIx::Class::Exception->throw('no version file found');
 #    unless -e $version_file;
@@ -1009,6 +1008,7 @@ sub populate {
     $tmp_fixture_dir->rmtree;
   }
   $self->msg("- creating temp dir");
+  $tmp_fixture_dir->mkpath();
   for ( map { $schema->source($_)->from } $schema->sources) {
     my $from_dir = $fixture_dir->subdir($_);
     next unless -e $from_dir;