]> pd.if.org Git - zpackage/commitdiff
ensure all paths are absolute in zpm-add
authorNathan Wagner <nw@hydaspes.if.org>
Sun, 21 Oct 2018 00:54:43 +0000 (00:54 +0000)
committerNathan Wagner <nw@hydaspes.if.org>
Sat, 3 Nov 2018 12:39:52 +0000 (12:39 +0000)
zpm-add

diff --git a/zpm-add b/zpm-add
index 119b29bd9b288cc43dab747ab1f1cc7f18bc43ab..6c2965c696dc8e659cd4857e0ad731be881c5615 100755 (executable)
--- a/zpm-add
+++ b/zpm-add
@@ -151,6 +151,9 @@ for path in $*; do
                rpath="$prefix/$rpath"
        fi
 
+       # ensure all paths are absolute
+       rpath=/${rpath#/}
+
        filetype=$(zpm stat -l -f '%t' "$path")
        hash='NULL'
        target='NULL'