summaryrefslogtreecommitdiffstats
path: root/twrp-functions.cpp
diff options
context:
space:
mode:
authorEthan Yonker <dees_troy@teamw.in>2014-02-26 20:59:18 +0100
committerGerrit Code Review <gerrit2@gerrit>2014-02-26 20:59:18 +0100
commit9f554cee9723ffc22be6218ddbff810769c3e42e (patch)
tree1cdb8cc0812a8b3c5e0e6cadbd9222b971722aa1 /twrp-functions.cpp
parentMerge "Allow sideloading from /tmp" into android-4.4 (diff)
parentCheck auto generated backup names for invalid characters (diff)
downloadandroid_bootable_recovery-9f554cee9723ffc22be6218ddbff810769c3e42e.tar
android_bootable_recovery-9f554cee9723ffc22be6218ddbff810769c3e42e.tar.gz
android_bootable_recovery-9f554cee9723ffc22be6218ddbff810769c3e42e.tar.bz2
android_bootable_recovery-9f554cee9723ffc22be6218ddbff810769c3e42e.tar.lz
android_bootable_recovery-9f554cee9723ffc22be6218ddbff810769c3e42e.tar.xz
android_bootable_recovery-9f554cee9723ffc22be6218ddbff810769c3e42e.tar.zst
android_bootable_recovery-9f554cee9723ffc22be6218ddbff810769c3e42e.zip
Diffstat (limited to 'twrp-functions.cpp')
-rw-r--r--twrp-functions.cpp4
1 files changed, 4 insertions, 0 deletions
diff --git a/twrp-functions.cpp b/twrp-functions.cpp
index 6c1f25f09..bce65f0ed 100644
--- a/twrp-functions.cpp
+++ b/twrp-functions.cpp
@@ -1018,6 +1018,10 @@ void TWFunc::Auto_Generate_Backup_Name() {
space_check = Backup_Name.substr(Backup_Name.size() - 1, 1);
}
DataManager::SetValue(TW_BACKUP_NAME, Backup_Name);
+ if (PartitionManager.Check_Backup_Name(false) != 0) {
+ LOGINFO("Auto generated backup name '%s' contains invalid characters, using date instead.\n", Backup_Name.c_str());
+ DataManager::SetValue(TW_BACKUP_NAME, Get_Current_Date());
+ }
}
void TWFunc::Fixup_Time_On_Boot()