Skip to content

Commit

Permalink
Fix CodeQL issues
Browse files Browse the repository at this point in the history
  • Loading branch information
worldwise001 committed Aug 17, 2024
1 parent f239197 commit 3f786eb
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion src/main/java/sh/shh/midi/roland/BlobExtractor.java
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@
import java.io.FileOutputStream;
import java.io.IOException;
import java.io.InputStream;
import java.nio.file.Path;
import java.util.jar.JarEntry;
import java.util.jar.JarFile;
import java.util.regex.Matcher;
Expand All @@ -26,7 +27,7 @@ static void extract(JarFile jarFile, JarEntry jarEntry, String outputDir) {
try {
Matcher matcher = REGEX.matcher(jarEntry.getName());
matcher.find();
String extractedFileName = matcher.group(1);
String extractedFileName = Path.of(matcher.group(1)).normalize().toString();
File outputFile = new File(outputDir, extractedFileName);
System.out.println("Extracting " + jarEntry.getName() + " -> " + outputFile.getPath());
if (!outputFile.exists()) {
Expand Down

0 comments on commit 3f786eb

Please sign in to comment.