diff --git a/common/src/main/java/com/xypower/common/JSONUtils.java b/common/src/main/java/com/xypower/common/JSONUtils.java index 982467b2..565f41de 100644 --- a/common/src/main/java/com/xypower/common/JSONUtils.java +++ b/common/src/main/java/com/xypower/common/JSONUtils.java @@ -2,6 +2,7 @@ package com.xypower.common; import android.content.Context; import android.os.Environment; +import android.text.TextUtils; import org.json.JSONArray; import org.json.JSONException; @@ -132,7 +133,7 @@ public class JSONUtils { return false; } - File configFile = new File(Environment.getExternalStorageDirectory(), path); + File configFile = new File(path.trim()); if (!configFile.exists()) { if (val == null) { // Should delete the config field