Add backup size checking
Converted bootloader.cpp to TWRP and removed AOSP fstab parsing
from startup
diff --git a/twrp-functions.cpp b/twrp-functions.cpp
index a681de2..066e6e5 100644
--- a/twrp-functions.cpp
+++ b/twrp-functions.cpp
@@ -221,9 +221,9 @@
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 @@
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;
}
\ No newline at end of file