summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorEthan Yonker <dees_troy@teamw.in>2014-02-26 19:05:55 +0100
committerEthan Yonker <dees_troy@teamw.in>2014-02-26 19:06:08 +0100
commit92d48e0696f905c3243dfcc06e5fe79a875aafb0 (patch)
tree5021904e5a2ef37140075dd3590c7fa2ff5ebd46
parentRemove unneeded logging (diff)
downloadandroid_bootable_recovery-92d48e0696f905c3243dfcc06e5fe79a875aafb0.tar
android_bootable_recovery-92d48e0696f905c3243dfcc06e5fe79a875aafb0.tar.gz
android_bootable_recovery-92d48e0696f905c3243dfcc06e5fe79a875aafb0.tar.bz2
android_bootable_recovery-92d48e0696f905c3243dfcc06e5fe79a875aafb0.tar.lz
android_bootable_recovery-92d48e0696f905c3243dfcc06e5fe79a875aafb0.tar.xz
android_bootable_recovery-92d48e0696f905c3243dfcc06e5fe79a875aafb0.tar.zst
android_bootable_recovery-92d48e0696f905c3243dfcc06e5fe79a875aafb0.zip
-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()