Fix root shell racing condition

This commit is contained in:
topjohnwu
2016-09-30 10:52:04 +08:00
parent 62523c815e
commit ff6bae936d
2 changed files with 8 additions and 6 deletions
@@ -46,7 +46,7 @@ public class Async {
String busybox = mContext.getApplicationInfo().dataDir + "/lib/libbusybox.so";
String zip = mContext.getApplicationInfo().dataDir + "/lib/libzip.so";
if (Shell.rootAccess()) {
if (!Utils.itemExist(toolPath)) {
if (!Utils.itemExist(false, toolPath)) {
Shell.sh(
"rm -rf " + toolPath,
"mkdir " + toolPath,