Github user eribeiro commented on the issue:

    https://github.com/apache/zookeeper/pull/140
  
    @hanm Oh, excuse me! There's a gotcha with ``File.equals()``. Shame on me 
for inducing your change to ``equals``. 😞 
    
    See here: http://stackoverflow.com/questions/8930859/java-file-equals
    And here: 
http://stackoverflow.com/questions/29368308/java-nio-how-is-path-issamefile-different-from-path-equals
    
    TL;DR: ``f1.getCanonicalPath().equals(f2.getCanonicalPath())`` is the right 
way to go. Or with **java 7** we can do ``Files.isSameFile(f1.toPath(), 
f2.toPath());``


---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at [email protected] or file a JIRA ticket
with INFRA.
---

Reply via email to