diff --git a/main/filesystem-crypto/src/main/java/org/cryptomator/filesystem/crypto/CryptoNode.java b/main/filesystem-crypto/src/main/java/org/cryptomator/filesystem/crypto/CryptoNode.java index 47993924a..3ddb9ea42 100644 --- a/main/filesystem-crypto/src/main/java/org/cryptomator/filesystem/crypto/CryptoNode.java +++ b/main/filesystem-crypto/src/main/java/org/cryptomator/filesystem/crypto/CryptoNode.java @@ -104,8 +104,8 @@ abstract class CryptoNode implements Node { if (obj instanceof CryptoNode) { CryptoNode other = (CryptoNode) obj; return this.getClass() == other.getClass() // - && (this.parent == null && other.parent == null || this.parent.equals(other.parent)) // - && (this.name == null && other.name == null || this.name.equals(other.name)); + && (this.parent == null && other.parent == null || this.parent != null && this.parent.equals(other.parent)) // + && (this.name == null && other.name == null || this.name != null && this.name.equals(other.name)); } else { return false; } diff --git a/main/filesystem-inmemory/src/main/java/org/cryptomator/filesystem/inmem/InMemoryNode.java b/main/filesystem-inmemory/src/main/java/org/cryptomator/filesystem/inmem/InMemoryNode.java index 3aa40cc82..032fb1ac0 100644 --- a/main/filesystem-inmemory/src/main/java/org/cryptomator/filesystem/inmem/InMemoryNode.java +++ b/main/filesystem-inmemory/src/main/java/org/cryptomator/filesystem/inmem/InMemoryNode.java @@ -86,8 +86,8 @@ abstract class InMemoryNode implements Node { if (obj instanceof InMemoryNode) { InMemoryNode other = (InMemoryNode) obj; return this.getClass() == other.getClass() // - && (this.parent == null && other.parent == null || this.parent.equals(other.parent)) // - && (this.name == null && other.name == null || this.name.equals(other.name)); + && (this.parent == null && other.parent == null || this.parent != null && this.parent.equals(other.parent)) // + && (this.name == null && other.name == null || this.name != null && this.name.equals(other.name)); } else { return false; }