FerryAr / lhroot

Linux Chroot Installer & Bootscript Magisk Module.
GNU General Public License v3.0
195 stars 21 forks source link

fix unexpected MOUNTPATH change when $KSU = false #47

Closed 255doesnotexist closed 6 months ago

255doesnotexist commented 7 months ago
$KSU && MOUNTPATH=$(dirname $MODPATH) || MOUNTPATH="$(magisk --path)/.magisk/modules"

will accidentally change MOUNTPATH if $KSU = false.

$KSU = false make the whole expression '$KSU && MOUNTPATH=$(dirname $MODPATH)' = false.

then shell will execute 'MOUNTPATH="$(magisk --path)/.magisk/modules" '

that is accidentally changed Magisk users' MOUNTPATH

so add the "$KSU &&" after the "||" is absolutely patch to reach maintainers original meanings

(as the "&&"'s priority higher than "||")

255doesnotexist commented 6 months ago

not work on other devices. i should take it back and think twice.