summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--data.cpp3
-rw-r--r--openrecoveryscript.cpp2
2 files changed, 3 insertions, 2 deletions
diff --git a/data.cpp b/data.cpp
index be76592aa..c766f0061 100644
--- a/data.cpp
+++ b/data.cpp
@@ -556,8 +556,7 @@ void DataManager::SetBackupFolder()
if (zip_path.size() < storage_path.size()) {
SetValue(TW_ZIP_LOCATION_VAR, storage_path);
} else {
- zip_root= zip_path;
- zip_root.resize(storage_path.size());
+ zip_root = TWFunc::Get_Root_Path(zip_path);
if (zip_root != storage_path) {
LOGINFO("DataManager::SetBackupFolder zip path was %s changing to %s, %s\n", zip_path.c_str(), storage_path.c_str(), zip_root.c_str());
SetValue(TW_ZIP_LOCATION_VAR, storage_path);
diff --git a/openrecoveryscript.cpp b/openrecoveryscript.cpp
index bb472bf82..88b382974 100644
--- a/openrecoveryscript.cpp
+++ b/openrecoveryscript.cpp
@@ -98,6 +98,8 @@ int OpenRecoveryScript::run_script_file(void) {
LOGINFO("command is: '%s' and ", command);
val_start = script_line;
val_start += cindex + 1;
+ if ((int) *val_start == 32)
+ val_start++; //get rid of space
if ((int) *val_start == 51)
val_start++; //get rid of = at the beginning
strncpy(value, val_start, line_len - cindex - remove_nl);