diff options
-rw-r--r-- | lib/Ultramarine/Model/DB.pm6 | 9 |
1 files changed, 5 insertions, 4 deletions
diff --git a/lib/Ultramarine/Model/DB.pm6 b/lib/Ultramarine/Model/DB.pm6 index 572d35c..422cd3e 100644 --- a/lib/Ultramarine/Model/DB.pm6 +++ b/lib/Ultramarine/Model/DB.pm6 @@ -122,11 +122,12 @@ class Ultramarine::Model::DB { LEAVE { .finish with $sth } } - method ensure-directories(IO() :$path! is copy) { + method ensure-directories(IO() :$path!) { + my $rel-path = $path.relative($path.CWD).IO; my @components = gather { - while $path ne '.'|'/' { - take $path.basename; - $path .= parent; + while $rel-path ne '.'|'/' { + take $rel-path.basename; + $rel-path .= parent; } }; my $parent-id=Nil; |