[core] Prevent folder removal during version switching (#1323)

This commit is contained in:
Howard Wu 2021-10-23 20:28:35 +08:00 committed by GitHub
parent bdb815cab6
commit cbe9389295
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 10 additions and 1 deletions

View File

@ -17,5 +17,14 @@
# Copyright (C) 2021 LSPosed Contributors
#
MODDIR=${0%/*}
MODSDIR=$(dirname "$MODDIR")
if [ -d "$MODSDIR/riru_lsposed" ] && [ -d "$MODSDIR/zygisk_lsposed" ]; then
if [ -f "$MODSDIR/riru_lsposed/remove" ] && [ -f "$MODSDIR/zygisk_lsposed/remove" ]; then
rm -rf /data/adb/lspd
fi
else
rm -rf /data/adb/lspd
fi
rm -rf /data/adb/riru/modules/lspd