summaryrefslogtreecommitdiffstats
path: root/partitionmanager.cpp
diff options
context:
space:
mode:
authorDees Troy <dees_troy@teamw.in>2013-09-10 19:36:41 +0200
committerGerrit Code Review <gerrit@198.50.184.117>2013-09-12 16:11:13 +0200
commitb21cc64ca8f5a9d936d6ece7da120bc0bc65b49f (patch)
tree47e1443a2b0591117a6ce5e20a5c3f05f61cca62 /partitionmanager.cpp
parentMerge "Kang in older minzip for building in CM9 & CM7" into twrp2.7 (diff)
downloadandroid_bootable_recovery-b21cc64ca8f5a9d936d6ece7da120bc0bc65b49f.tar
android_bootable_recovery-b21cc64ca8f5a9d936d6ece7da120bc0bc65b49f.tar.gz
android_bootable_recovery-b21cc64ca8f5a9d936d6ece7da120bc0bc65b49f.tar.bz2
android_bootable_recovery-b21cc64ca8f5a9d936d6ece7da120bc0bc65b49f.tar.lz
android_bootable_recovery-b21cc64ca8f5a9d936d6ece7da120bc0bc65b49f.tar.xz
android_bootable_recovery-b21cc64ca8f5a9d936d6ece7da120bc0bc65b49f.tar.zst
android_bootable_recovery-b21cc64ca8f5a9d936d6ece7da120bc0bc65b49f.zip
Diffstat (limited to '')
-rw-r--r--partitionmanager.cpp9
1 files changed, 5 insertions, 4 deletions
diff --git a/partitionmanager.cpp b/partitionmanager.cpp
index 78fbfa489..4e72117dd 100644
--- a/partitionmanager.cpp
+++ b/partitionmanager.cpp
@@ -670,10 +670,11 @@ int TWPartitionManager::Run_Backup(void) {
DataManager::GetValue(TW_BACKUPS_FOLDER_VAR, Backup_Folder);
DataManager::GetValue(TW_BACKUP_NAME, Backup_Name);
- if (Backup_Name == "(Current Date)" || Backup_Name == "0" || Backup_Name.empty()) {
- char timestamp[255];
- sprintf(timestamp,"%04d-%02d-%02d--%02d-%02d-%02d",t->tm_year+1900,t->tm_mon+1,t->tm_mday,t->tm_hour,t->tm_min,t->tm_sec);
- Backup_Name = timestamp;
+ if (Backup_Name == "(Current Date)") {
+ Backup_Name = TWFunc::Get_Current_Date();
+ } else if (Backup_Name == "(Auto Generate)" || Backup_Name == "0" || Backup_Name.empty()) {
+ TWFunc::Auto_Generate_Backup_Name();
+ DataManager::GetValue(TW_BACKUP_NAME, Backup_Name);
}
LOGINFO("Backup Name is: '%s'\n", Backup_Name.c_str());
Full_Backup_Path = Backup_Folder + "/" + Backup_Name + "/";