Fix fail over to vfat from exfat

Fix issues with MD5 checking using chdir and leaving the working
dir in a subfolder that prevented unmounting sometimes.

Change-Id: I01a563d722f474297ed3f7a30064c3a61748ade3
This commit is contained in:
Dees_Troy
2013-02-01 15:16:59 +00:00
parent dc771da4fb
commit 3f5c4e8dfe
4 changed files with 69 additions and 40 deletions
+1 -2
View File
@@ -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) {