From 40cc015a209e04f0a80f27728a88e3461b210fac Mon Sep 17 00:00:00 2001 From: Michael Prokop Date: Fri, 16 Sep 2016 11:09:25 +0200 Subject: [PATCH] MT#22361 helper/restore-permissions: ensure we're in the target directory Otherwise the according changes might not get applied as needed. Change-Id: I00909bb54af20a73302225fb4167d58e7a998d39 --- helper/restore-permissions | 2 ++ 1 file changed, 2 insertions(+) diff --git a/helper/restore-permissions b/helper/restore-permissions index f8fe4741..f4299e80 100755 --- a/helper/restore-permissions +++ b/helper/restore-permissions @@ -34,6 +34,8 @@ if ! [ -d "${target_directory}" ] ; then exit 1 fi +cd "$target_directory" + # should only be run on repositories you trust if ! [ -e "$target_directory"/.ngcpcfg_perms ]; then log_warn "Permission file ${target_directory}/.ngcpcfg_perms doesn't exist."