diff options
-rw-r--r-- | partition.cpp | 2 | ||||
-rw-r--r-- | twrp.cpp | 7 |
2 files changed, 1 insertions, 8 deletions
diff --git a/partition.cpp b/partition.cpp index 5cf017987..8832909fe 100644 --- a/partition.cpp +++ b/partition.cpp @@ -1318,7 +1318,7 @@ bool TWPartition::UnMount(bool Display_Error) { if (never_unmount_system == 1 && Mount_Point == "/system") return true; // Never unmount system if you're not supposed to unmount it - if (Is_Storage) + if (Is_Storage && MTP_Storage_ID > 0) PartitionManager.Remove_MTP_Storage(MTP_Storage_ID); if (!Symlink_Mount_Point.empty()) @@ -289,13 +289,6 @@ int main(int argc, char **argv) { } // Read the settings file -#ifdef TW_HAS_MTP - // We unmount partitions sometimes during early boot which may override - // the default of MTP being enabled by auto toggling MTP off. This - // will force it back to enabled then get overridden by the settings - // file, assuming that an entry for tw_mtp_enabled is set. - DataManager::SetValue("tw_mtp_enabled", 1); -#endif DataManager::ReadSettingsFile(); PageManager::LoadLanguage(DataManager::GetStrValue("tw_language")); GUIConsole::Translate_Now(); |