diff --git a/core/src/main/java/io/xpipe/core/store/FilePath.java b/core/src/main/java/io/xpipe/core/store/FilePath.java index 048b594b0..94bdb47f1 100644 --- a/core/src/main/java/io/xpipe/core/store/FilePath.java +++ b/core/src/main/java/io/xpipe/core/store/FilePath.java @@ -9,9 +9,9 @@ import java.nio.file.Path; import java.util.ArrayList; import java.util.Arrays; import java.util.List; +import java.util.Objects; import java.util.regex.Pattern; -@EqualsAndHashCode public final class FilePath { public static boolean isProbableFilePath(OsType osType, String s) { @@ -45,6 +45,20 @@ public final class FilePath { } } + @Override + public boolean equals(Object o) { + if (o == null || getClass() != o.getClass()) { + return false; + } + FilePath filePath = (FilePath) o; + return Objects.equals(value, filePath.value); + } + + @Override + public int hashCode() { + return Objects.hashCode(value); + } + public FilePath fileSystemCompatible(OsType osType) { var split = split(); var needsReplacement = split.stream().anyMatch(s -> !s.equals(osType.makeFileSystemCompatible(s)));