Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 38c3aa78 authored by xiaolu's avatar xiaolu Committed by Ethan Yonker
Browse files

openrecoveryscript: really append ORS command to ORS script file.

for example, in "/cache/recovery/command" :
--wipe_data
--update-package=/sdcard/1.zip

Change-Id: I70c92a868372dca48024e303a0778f9409ab0dc9
parent 047723c5
Loading
Loading
Loading
Loading
+2 −2
Original line number Diff line number Diff line
@@ -420,12 +420,12 @@ int OpenRecoveryScript::run_script_file(void) {
}

int OpenRecoveryScript::Insert_ORS_Command(string Command) {
	ofstream ORSfile(SCRIPT_FILE_TMP);
	ofstream ORSfile(SCRIPT_FILE_TMP, ios_base::app | ios_base::out);
	if (ORSfile.is_open()) {
		//if (Command.substr(Command.size() - 1, 1) != "\n")
		//	Command += "\n";
		LOGINFO("Inserting '%s'\n", Command.c_str());
		ORSfile << Command.c_str();
		ORSfile << Command.c_str() << endl;
		ORSfile.close();
		return 1;
	}