Skip to content

Commit 475ba49

Browse files
committed
Update FileUtils.java
1 parent f2dc846 commit 475ba49

1 file changed

Lines changed: 2 additions & 2 deletions

File tree

src/main/java/io/github/intisy/utils/utils/FileUtils.java

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -88,13 +88,13 @@ public static void copyFolder(File source, File destination) {
8888
throw new RuntimeException(e);
8989
}
9090
}
91-
91+
9292
public static File resourceToFile(Class<?> resourceClass, String path) {
9393
URL resourceUrl = resourceClass.getClassLoader().getResource(path);
9494
assert resourceUrl != null;
9595
String[] split = path.split("\\.");
9696
String suffix = path.split("\\.")[split.length - 1];
97-
String prefix = path.substring(0, suffix.length() - 1);
97+
String prefix = "temp-resource";
9898
try {
9999
File tempFile = File.createTempFile(prefix, suffix);
100100
try (OutputStream outputStream = Files.newOutputStream(tempFile.toPath())) {

0 commit comments

Comments
 (0)