From e96c3c34c2d825f2cfca654f665b6259098e0a02 Mon Sep 17 00:00:00 2001 From: Matt Mower Date: Fri, 19 Sep 2014 12:14:37 -0500 Subject: Remove extra slashes from zip path in openrecovery TWFunc::Get_Path() returns a path with a trailing slash and the substr method is returning a string with a leading slash, so we don't need to specify additional slashes for wholePath in Locate_Zip_File(). Also, put 'value' readout to log on its own line if it exists. Change-Id: I2a4db6dbde5552f5a803eabb0599fd983d683fca --- openrecoveryscript.cpp | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/openrecoveryscript.cpp b/openrecoveryscript.cpp index 1461f2d88..0b71a42eb 100644 --- a/openrecoveryscript.cpp +++ b/openrecoveryscript.cpp @@ -105,7 +105,7 @@ int OpenRecoveryScript::run_script_file(void) { remove_nl = 1; if (cindex != 0) { strncpy(command, script_line, cindex); - LOGINFO("command is: '%s' and ", command); + LOGINFO("command is: '%s'\n", command); val_start = script_line; val_start += cindex + 1; if ((int) *val_start == 32) @@ -477,11 +477,11 @@ string OpenRecoveryScript::Locate_Zip_File(string Zip, string Storage_Root) { while (pos != string::npos) { pathCpy = Path.substr(pos, Path.size() - pos); - wholePath = pathCpy + "/" + File; + wholePath = pathCpy + File; LOGINFO("Looking for zip at '%s'\n", wholePath.c_str()); if (TWFunc::Path_Exists(wholePath)) return wholePath; - wholePath = Storage_Root + "/" + wholePath; + wholePath = Storage_Root + wholePath; LOGINFO("Looking for zip at '%s'\n", wholePath.c_str()); if (TWFunc::Path_Exists(wholePath)) return wholePath; -- cgit v1.2.3