Signed-off-by: Chaoscaot <chaoscaot444@gmail.com>
Dieser Commit ist enthalten in:
Ursprung
72708d7183
Commit
04de43ed4d
@ -34,6 +34,7 @@ import java.sql.SQLException;
|
||||
import java.sql.Timestamp;
|
||||
import java.time.Instant;
|
||||
import java.util.*;
|
||||
import java.util.concurrent.atomic.AtomicInteger;
|
||||
import java.util.function.Predicate;
|
||||
import java.util.zip.GZIPInputStream;
|
||||
|
||||
@ -488,8 +489,12 @@ public class SchematicNode {
|
||||
StringBuilder builder = new StringBuilder(getName());
|
||||
SchematicNode currentNode = this;
|
||||
if (currentNode.isDir()) builder.append("/");
|
||||
while (currentNode.getParentNode() != null && !currentNode.getMembers().stream().anyMatch(member -> member.getMember() == user.getId())) {
|
||||
final Set<NodeMember> nodeMembers = NodeMember.getSchematics(user.getId());
|
||||
AtomicInteger i = new AtomicInteger();
|
||||
i.set(currentNode.getId());
|
||||
while (currentNode.getParentNode() != null && nodeMembers.stream().noneMatch(nodeMember -> nodeMember.getNode() == i.get())) {
|
||||
currentNode = currentNode.getParentNode();
|
||||
i.set(currentNode.getId());
|
||||
builder.insert(0, split)
|
||||
.insert(0, currentNode.getName());
|
||||
}
|
||||
|
In neuem Issue referenzieren
Einen Benutzer sperren