From e75530d7a2b0e09e7bae5cc482c24b2f213c3c85 Mon Sep 17 00:00:00 2001
From: Le Zhou <2428499107@qq.com>
Date: Mon, 23 Dec 2024 14:32:59 +0800
Subject: [PATCH] test

---
 .github/workflows/codeql.yml                              | 6 +++---
 .../hydralab/android/client/vpn/HydraLabVpnLogger.kt      | 8 +-------
 2 files changed, 4 insertions(+), 10 deletions(-)

diff --git a/.github/workflows/codeql.yml b/.github/workflows/codeql.yml
index ccca399c9..a3d694a58 100644
--- a/.github/workflows/codeql.yml
+++ b/.github/workflows/codeql.yml
@@ -42,7 +42,7 @@ jobs:
 
     # Initializes the CodeQL tools for scanning.
     - name: Initialize CodeQL
-      uses: github/codeql-action/init@v2
+      uses: github/codeql-action/init@v3
       with:
         languages: ${{ matrix.language }}
         # If you wish to specify custom queries, you can do so here or in a config file.
@@ -56,7 +56,7 @@ jobs:
     # Autobuild attempts to build any compiled languages  (C/C++, C#, or Java).
     # If this step fails, then you should remove it and run the build manually (see below)
     - name: Autobuild
-      uses: github/codeql-action/autobuild@v2
+      uses: github/codeql-action/autobuild@v3
 
     # ℹī¸ Command-line programs to run using the OS shell.
     # 📚 See https://docs.github.com/en/actions/using-workflows/workflow-syntax-for-github-actions#jobsjob_idstepsrun
@@ -69,6 +69,6 @@ jobs:
     #   ./location_of_script_within_repo/buildscript.sh
 
     - name: Perform CodeQL Analysis
-      uses: github/codeql-action/analyze@v2
+      uses: github/codeql-action/analyze@v3
       with:
         category: "/language:${{matrix.language}}"
diff --git a/android_client/app/src/main/java/com/microsoft/hydralab/android/client/vpn/HydraLabVpnLogger.kt b/android_client/app/src/main/java/com/microsoft/hydralab/android/client/vpn/HydraLabVpnLogger.kt
index 2339688da..d5ff341b8 100644
--- a/android_client/app/src/main/java/com/microsoft/hydralab/android/client/vpn/HydraLabVpnLogger.kt
+++ b/android_client/app/src/main/java/com/microsoft/hydralab/android/client/vpn/HydraLabVpnLogger.kt
@@ -18,13 +18,7 @@ class HydraLabVpnLogger(private var filePath: String?) {
         if (filePath != null) {
             filePath = Environment.getExternalStorageDirectory().toString() + filePath
 
-            val publicFolder = Path(Environment.getExternalStorageDirectory().toString()).toString()
-            val fileUrl = Path(filePath.toString()).toString()
-            if (!fileUrl.startsWith(publicFolder + File.separator)) {
-                throw IllegalArgumentException("Invalid file path")
-            }
-
-            val file = File(fileUrl ?: "")
+            val file = File(filePath ?: "")
             if (file.exists()) {
                 file.writeText("")
             } else {