about summary refs log tree commit diff
path: root/perl/lib/Nix/Store.xs
diff options
context:
space:
mode:
Diffstat (limited to 'perl/lib/Nix/Store.xs')
-rw-r--r--perl/lib/Nix/Store.xs2
1 files changed, 1 insertions, 1 deletions
diff --git a/perl/lib/Nix/Store.xs b/perl/lib/Nix/Store.xs
index fd2a6e2e8278..6a94bc90b23f 100644
--- a/perl/lib/Nix/Store.xs
+++ b/perl/lib/Nix/Store.xs
@@ -282,7 +282,7 @@ SV * addToStore(char * srcPath, int recursive, char * algo)
     PPCODE:
         try {
             doInit();
-            Path path = store->addToStore(srcPath, recursive, parseHashType(algo));
+            Path path = store->addToStore(baseNameOf(srcPath), srcPath, recursive, parseHashType(algo));
             XPUSHs(sv_2mortal(newSVpv(path.c_str(), 0)));
         } catch (Error & e) {
             croak(e.what());