slawekjaranowski commented on PR #297: URL: https://github.com/apache/maven-enforcer/pull/297#issuecomment-5705377816
Thank you for this PR, and sorry it sat here for so long. It correctly identified a real regression, and the tests you wrote are what finally pinned it down. The issue turned out to have two halves: * **Non-canonical paths (`..`, `.`)** — fixed in #1011, which normalizes the path before comparing. The IT you added here passes on current `master` unchanged. * **Symbolic links** — still broken, exactly as your `testSymbolicLinkExists` shows. `getCanonicalFile()` resolves a link to its target, so the link name never matched. We went a slightly different route than the revert proposed here: #1031 keeps the case check but resolves with `toRealPath(NOFOLLOW_LINKS)` instead. That leaves the link alone while still correcting case on a case-insensitive filesystem, so symbolic links, `..` paths and the case check from #477 all work at the same time. Your symbolic link tests for all three rules and the relative-path IT are included in #1031, and you are credited as co-author on the commit. One small note in case it is useful: in `testSymbolicLinkTargetDeletedDetected` the first `rule.execute()` ran before `setFilesList()`, so it was passing on the empty-file-list error rather than on the link check — moved the setup up in #1031. Closing this in favour of #1031. Thanks again for the report and the tests. -- This is an automated message from the Apache Git Service. To respond to the message, please log on to GitHub and use the URL above to go to the specific comment. To unsubscribe, e-mail: [email protected] For queries about this service, please contact Infrastructure at: [email protected]
