Fix invalid "ends with .sh" check in rom_quirks

This commit is contained in:
Vojtech Bocek
2015-03-04 01:02:12 +01:00
parent 98ae429d25
commit 8287ec2306
3 changed files with 11 additions and 1 deletions

View File

@@ -230,7 +230,7 @@ void rom_quirks_on_android_mounted_fs(struct multirom_rom *rom)
// franco.Kernel includes script init.fk.sh which remounts /system as read only
// comment out lines with mount and /system in all .sh scripts in /
if(strstr(dt->d_name, ".sh") && (M(rom->type) & MASK_ANDROID) && rom->type != ROM_ANDROID_USB_IMG)
if(strendswith(dt->d_name, ".sh") && (M(rom->type) & MASK_ANDROID) && rom->type != ROM_ANDROID_USB_IMG)
{
snprintf(buff, sizeof(buff), "/%s", dt->d_name);
workaround_mount_in_sh(buff);