You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@ant.apache.org by "bodewig (via GitHub)" <gi...@apache.org> on 2025/05/31 13:06:54 UTC

Re: [PR] Fix PermissionUtils.FileType.of for sym links [ant]

bodewig commented on code in PR #217:
URL: https://github.com/apache/ant/pull/217#discussion_r2117819764


##########
src/tests/junit/org/apache/tools/ant/util/PermissionUtilsTest.java:
##########
@@ -92,6 +94,16 @@ public void detectsFileTypeOfDirectoryFromResource() throws IOException {
                      PermissionUtils.FileType.of(new FileResource(folder.newFolder("ant.tst"))));
     }
 
+    @Test
+    public void detectsFileTypeOfSymbolicLinkFromPath() throws IOException {
+        if (!System.getProperty("os.name").contains("Windows")) {

Review Comment:
   please use `org.apache.tools.ant.taskdefs.condition.Os#isFamily` instead as this is what we do in other platform dependent tests. `Os.isFamily("unix")` would likely be better (not that I believe anybody would run the tests on OS/2 these days).



-- 
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: dev-unsubscribe@ant.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@ant.apache.org
For additional commands, e-mail: dev-help@ant.apache.org