Skip to content

Commit a0a7f85

Browse files
committed
Fix mergeJar prefix sometimes adding an extra / to file names when reading from directories.
1 parent acf4f28 commit a0a7f85

File tree

1 file changed

+2
-0
lines changed

1 file changed

+2
-0
lines changed

file-utils/src/main/java/net/minecraftforge/util/file/FileUtils.java

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -162,6 +162,8 @@ public static void mergeJars(File output, boolean stripSignatures, @Nullable BiP
162162

163163
if (input.isDirectory()) {
164164
var prefix = input.getAbsolutePath();
165+
if (!prefix.endsWith(File.separator))
166+
prefix += File.separatorChar;
165167
for (var file : FileUtils.listFiles(input)) {
166168
var name = file.getAbsolutePath().substring(prefix.length()).replace('\\', '/');
167169

0 commit comments

Comments
 (0)