backuptool: Run check_{black, white}list with proper system path
* If any of these two function gets run on a recovery mounting system
to /system, /system/addon.d won't exist while /system/system/addon.d will.
* Run the functions with $S as argument to make this work correctly
Change-Id: I02e7b91429a9e74d28bdb77e56955dad97ca75ac
diff --git a/prebuilt/common/bin/backuptool.sh b/prebuilt/common/bin/backuptool.sh
index 9c62046..e873b2e 100755
--- a/prebuilt/common/bin/backuptool.sh
+++ b/prebuilt/common/bin/backuptool.sh
@@ -126,12 +126,12 @@
mount_system
mkdir -p $C
if check_prereq; then
- if check_whitelist system; then
+ if check_whitelist $S; then
unmount_system
exit 127
fi
fi
- check_blacklist system
+ check_blacklist $S
preserve_addon_d
run_stage pre-backup
run_stage backup