summaryrefslogtreecommitdiffstats
path: root/partitionmanager.cpp
diff options
context:
space:
mode:
authorbig biff <bigbiff@teamw.in>2019-04-03 01:22:19 +0200
committerGerrit Code Review <gerrit2@gerrit.omnirom.org>2019-04-03 01:22:19 +0200
commit794e364e08728d8e130692062c6fe14ee1f93d47 (patch)
tree6d0badddf62ecf424b4f8bc5ac9bdfbc5fd8305b /partitionmanager.cpp
parentADB Backup: Stop resetting digest check on restore. (diff)
parentADB Backup: Ignore creating backup folder for phones (diff)
downloadandroid_bootable_recovery-794e364e08728d8e130692062c6fe14ee1f93d47.tar
android_bootable_recovery-794e364e08728d8e130692062c6fe14ee1f93d47.tar.gz
android_bootable_recovery-794e364e08728d8e130692062c6fe14ee1f93d47.tar.bz2
android_bootable_recovery-794e364e08728d8e130692062c6fe14ee1f93d47.tar.lz
android_bootable_recovery-794e364e08728d8e130692062c6fe14ee1f93d47.tar.xz
android_bootable_recovery-794e364e08728d8e130692062c6fe14ee1f93d47.tar.zst
android_bootable_recovery-794e364e08728d8e130692062c6fe14ee1f93d47.zip
Diffstat (limited to 'partitionmanager.cpp')
-rwxr-xr-xpartitionmanager.cpp16
1 files changed, 12 insertions, 4 deletions
diff --git a/partitionmanager.cpp b/partitionmanager.cpp
index 6b5ee1cca..26a48e5dc 100755
--- a/partitionmanager.cpp
+++ b/partitionmanager.cpp
@@ -907,10 +907,18 @@ int TWPartitionManager::Run_Backup(bool adbbackup) {
part_settings.file_bytes_remaining = part_settings.file_bytes;
gui_msg("backup_started=[BACKUP STARTED]");
- gui_msg(Msg("backup_folder= * Backup Folder: {1}")(part_settings.Backup_Folder));
- if (!TWFunc::Recursive_Mkdir(part_settings.Backup_Folder)) {
- gui_err("fail_backup_folder=Failed to make backup folder.");
- return false;
+
+ int is_decrypted = 0;
+ int is_encrypted = 0;
+
+ DataManager::GetValue(TW_IS_DECRYPTED, is_decrypted);
+ DataManager::GetValue(TW_IS_ENCRYPTED, is_encrypted);
+ if (!adbbackup || (!is_encrypted || (is_encrypted && is_decrypted))) {
+ gui_msg(Msg("backup_folder= * Backup Folder: {1}")(part_settings.Backup_Folder));
+ if (!TWFunc::Recursive_Mkdir(part_settings.Backup_Folder)) {
+ gui_err("fail_backup_folder=Failed to make backup folder.");
+ return false;
+ }
}
DataManager::SetProgress(0.0);