From bfb1646e1bb3a8b06ea836db26e4e5c730fa7289 Mon Sep 17 00:00:00 2001 From: Konstantin Kolosovsky Date: Mon, 18 Jun 2018 18:36:10 +0300 Subject: [PATCH] svn: Compare "java.io.File" files with "FileUtil.filesEqual()" --- plugins/svn4idea/src/org/jetbrains/idea/svn/WorkingCopy.kt | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/plugins/svn4idea/src/org/jetbrains/idea/svn/WorkingCopy.kt b/plugins/svn4idea/src/org/jetbrains/idea/svn/WorkingCopy.kt index ed6e9148b5dc..4e55062a2bf7 100644 --- a/plugins/svn4idea/src/org/jetbrains/idea/svn/WorkingCopy.kt +++ b/plugins/svn4idea/src/org/jetbrains/idea/svn/WorkingCopy.kt @@ -1,8 +1,9 @@ // Copyright 2000-2018 JetBrains s.r.o. Use of this source code is governed by the Apache 2.0 license that can be found in the LICENSE file. package org.jetbrains.idea.svn +import com.intellij.openapi.util.io.FileUtil.fileHashCode +import com.intellij.openapi.util.io.FileUtil.filesEqual import org.jetbrains.idea.svn.api.Url - import java.io.File // TODO: is17Copy is currently true in all constructor usages - remove this field and revise is17Copy() usages @@ -11,8 +12,8 @@ class WorkingCopy(val file: File, val url: Url, val is17Copy: Boolean) { if (this === other) return true if (other !is WorkingCopy) return false - return file == other.file + return filesEqual(file, other.file) } - override fun hashCode() = file.hashCode() + override fun hashCode() = fileHashCode(file) }