From 79a86ca11cef824c99c71d23f33044ce67db4cc4 Mon Sep 17 00:00:00 2001
From: Will Dietz <w@wdtz.org>
Date: Mon, 20 Aug 2018 12:44:29 -0500
Subject: [PATCH] audit-tmpdir: fix processing of files with spaces, quote
 variables

---
 pkgs/build-support/setup-hooks/audit-tmpdir.sh | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/pkgs/build-support/setup-hooks/audit-tmpdir.sh b/pkgs/build-support/setup-hooks/audit-tmpdir.sh
index ffaa61f2d80..0f515842ebc 100644
--- a/pkgs/build-support/setup-hooks/audit-tmpdir.sh
+++ b/pkgs/build-support/setup-hooks/audit-tmpdir.sh
@@ -27,7 +27,7 @@ auditTmpdir() {
         fi
 
         if  isScript "$i"; then
-            if [ -e "$(dirname $i)/.$(basename $i)-wrapped" ]; then
+            if [ -e "$(dirname "$i")/.$(basename "$i")-wrapped" ]; then
                 if grep -q -F "$TMPDIR" "$i"; then
                     echo "wrapper script $i contains a forbidden reference to $TMPDIR"
                     exit 1