Add backup size checking

Converted bootloader.cpp to TWRP and removed AOSP fstab parsing
from startup
This commit is contained in:
Dees_Troy
2012-09-26 09:49:14 -04:00
parent 9df963c9cd
commit 7c2dec8020
7 changed files with 241 additions and 13 deletions
+10 -2
View File
@@ -221,9 +221,9 @@ unsigned long long TWFunc::Get_Folder_Size(string Path, bool Display_Error) {
bool TWFunc::Path_Exists(string Path) {
// Check to see if the Path exists
struct statfs st;
struct stat st;
if (statfs(Path.c_str(), &st) != 0)
if (stat(Path.c_str(), &st) != 0)
return false;
else
return true;
@@ -249,4 +249,12 @@ void TWFunc::GUI_Operation_Text(string Read_Value, string Partition_Name, string
DataManager::SetValue("tw_operation", Display_Text);
DataManager::SetValue("tw_partition", Partition_Name);
}
unsigned long TWFunc::Get_File_Size(string Path) {
struct stat st;
if (stat(Path.c_str(), &st) != 0)
return 0;
return st.st_size;
}