summaryrefslogtreecommitdiffstats
path: root/twrp-functions.cpp
diff options
context:
space:
mode:
Diffstat (limited to '')
-rw-r--r--twrp-functions.cpp3
1 files changed, 1 insertions, 2 deletions
diff --git a/twrp-functions.cpp b/twrp-functions.cpp
index 0c4471ac7..4a5dec273 100644
--- a/twrp-functions.cpp
+++ b/twrp-functions.cpp
@@ -62,8 +62,7 @@ int TWFunc::Check_MD5(string File) {
if (Path_Exists(MD5_File)) {
DirPath = Get_Path(File);
MD5_File = Get_Filename(MD5_File);
- chdir(DirPath.c_str());
- Command = "/sbin/busybox md5sum -c " + MD5_File;
+ Command = "cd '" + DirPath + "' && /sbin/busybox md5sum -c '" + MD5_File + "'";
Exec_Cmd(Command, result);
pos = result.find(":");
if (pos != string::npos) {