addFileWithSameHash(): Check hash instead of canonical path.