Skip to content

Commit

Permalink
sonarcloud fixes
Browse files Browse the repository at this point in the history
  • Loading branch information
LuciaM1 committed Sep 20, 2024
1 parent 896c4d3 commit 6410309
Showing 1 changed file with 3 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,7 @@
import java.io.IOException;
import java.math.BigInteger;
import java.nio.file.Files;
import java.nio.file.Path;
import java.security.MessageDigest;
import java.security.NoSuchAlgorithmException;
import java.util.Base64;
Expand Down Expand Up @@ -97,7 +98,8 @@ public static String toHexString(byte[] hash) {
public static File fromStringToFile(String fileBase64) {
try {
byte[] decodedBytes = Base64.getDecoder().decode(fileBase64);
File tempFile = Files.createTempFile("tempfile", ".tmp").toFile();
Files.createDirectories(Path.of("/decoded"));
File tempFile = File.createTempFile("tempfile", ".tmp", new File("/decoded"));
try (FileOutputStream fos = new FileOutputStream(tempFile)) {
fos.write(decodedBytes);
}
Expand Down

0 comments on commit 6410309

Please sign in to comment.