We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 184ee6c commit ee35db4Copy full SHA for ee35db4
1 file changed
src/main/java/cpw/mods/niofs/union/UnionPath.java
@@ -32,10 +32,12 @@ public class UnionPath implements Path {
32
this.absolute = false;
33
this.pathParts = new String[0];
34
} else {
35
- StringJoiner joiner = new StringJoiner(UnionFileSystem.SEP_STRING);
36
- for (String element : pathParts) {
+ StringBuilder joiner = new StringBuilder();
+ for (int i = 0; i < pathParts.length; i++) {
37
+ final String element = pathParts[i];
38
if (!element.isEmpty()) {
- joiner.add(element);
39
+ joiner.append(element);
40
+ if (i<pathParts.length-1) joiner.append(UnionFileSystem.SEP_STRING);
41
}
42
43
final var longstring = joiner.toString();
0 commit comments