From 7e23d09814e421ed02179b73ce3df1b3dd008850 Mon Sep 17 00:00:00 2001 From: Matthew Date: Sat, 10 May 2025 18:37:56 +0800 Subject: [PATCH] =?UTF-8?q?=E4=BF=AE=E5=A4=8D=E8=BF=90=E7=BB=B4=E4=BF=AE?= =?UTF-8?q?=E6=94=B9=E9=85=8D=E7=BD=AE=E6=96=87=E4=BB=B6=E7=9A=84bug?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- common/src/main/java/com/xypower/common/JSONUtils.java | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) 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