Commits

Anonymous committed 9ceb641

Fixed a bug in File::Find::Object::TreeCreate (with the appropriate test).

  • Participants
  • Parent commits 7eba30e

Comments (0)

Files changed (2)

t/02tree-create.t

 use strict;
 use warnings;
 
-use Test::More tests => 21;
+use Test::More tests => 22;
 
 BEGIN
 {
         # Cleanup
         rmtree ($t->get_path("./t/sample-data/tree-test-1"));
     }
+    {
+        # TEST
+        is ($t->get_path("s/hello"), File::Spec->catfile("s", "hello"),
+            "Bug that eliminated ^[AnyChar]/ instead of ^\\./"
+        );
+    }
 }
+

t/lib/File/Find/Object/TreeCreate.pm

 
     my @components;
 
-    if ($path =~ s{^./}{})
+    if ($path =~ s{^\./}{})
     {
         push @components, File::Spec->curdir();
     }