diff options
Diffstat (limited to 'lib/App/annex_to_annex.pm')
-rw-r--r-- | lib/App/annex_to_annex.pm | 9 |
1 files changed, 5 insertions, 4 deletions
diff --git a/lib/App/annex_to_annex.pm b/lib/App/annex_to_annex.pm index d68cc4a..af4346b 100644 --- a/lib/App/annex_to_annex.pm +++ b/lib/App/annex_to_annex.pm @@ -109,9 +109,9 @@ sub main { #>>> } - my $base = basename $source; my @missing - = $annex->annex->find("--not", "--in", "here", $base); + = $annex->annex->find("--not", "--in", "here", + abs2rel $source, $annex->toplevel); if (@missing) { say "Following annexed files are not present in this repo:"; say for @missing; @@ -130,7 +130,7 @@ sub main { die "$target already exists!\n" if -e $target and !-d $target; - my $key = $lk->ask($rel); + my $key = $lk->ask($File::Find::name); if ($key) { # this is an annexed file my $content = rel2abs $cl->ask($key), $annex->toplevel; my $content_device_id = (stat $content)[0]; @@ -147,7 +147,8 @@ sub main { # to the source, or anything like that system "git", "-C", $dest, "annex", "add", $rel; system "git", "-C", $dest, "annex", "unlock", $rel - if $find->ask($rel); + if $find->ask(abs2rel $File::Find::name, + $annex->toplevel); # if using the default backend, quick sanity check if ($key =~ /^SHA256E-s[0-9]+--([0-9a-f]+)/) { |