really fixed missing path problem
[dbsrgits/DBIx-Class-Fixtures.git] / lib / DBIx / Class / Fixtures / External / File.pm
index 4277e7b..cb13965 100644 (file)
@@ -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);
 }