summaryrefslogtreecommitdiffstats
path: root/partitionmanager.cpp
diff options
context:
space:
mode:
Diffstat (limited to '')
-rw-r--r--partitionmanager.cpp7
1 files changed, 7 insertions, 0 deletions
diff --git a/partitionmanager.cpp b/partitionmanager.cpp
index e752a129c..7ebd64f0b 100644
--- a/partitionmanager.cpp
+++ b/partitionmanager.cpp
@@ -1650,6 +1650,13 @@ int TWPartitionManager::Decrypt_Device(string Password) {
sdcard->Is_Decrypted = true;
sdcard->EcryptFS_Password = Password;
sdcard->Decrypted_Block_Device = sdcard->Actual_Block_Device;
+ string MetaEcfsFile = EXPAND(TW_EXTERNAL_STORAGE_PATH);
+ MetaEcfsFile += "/.MetaEcfsFile";
+ if (!TWFunc::Path_Exists(MetaEcfsFile)) {
+ // External storage isn't actually encrypted so unmount and remount without ecryptfs
+ sdcard->UnMount(false);
+ sdcard->Mount(false);
+ }
} else {
sdcard->Is_Decrypted = false;
sdcard->Decrypted_Block_Device = "";