Skip to content

Commit

Permalink
test
Browse files Browse the repository at this point in the history
  • Loading branch information
zhou9584 committed Dec 23, 2024
1 parent e950a25 commit e75530d
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 10 deletions.
6 changes: 3 additions & 3 deletions .github/workflows/codeql.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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.
Expand All @@ -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
Expand All @@ -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}}"
Original file line number Diff line number Diff line change
Expand Up @@ -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 {
Expand Down

0 comments on commit e75530d

Please sign in to comment.