You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@ant.apache.org by "kiendang (via GitHub)" <gi...@apache.org> on 2025/03/13 04:52:29 UTC
[PR] Fix PermissionUtils.FileType.of for sym links [ant]
kiendang opened a new pull request, #217:
URL: https://github.com/apache/ant/pull/217
Currently `PermissionUtils.FileType.of` returns `REGULAR_FILE` instead of `SYMLINK` for sym links.
--
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
Re: [PR] Fix PermissionUtils.FileType.of for sym links [ant]
Posted by "bodewig (via GitHub)" <gi...@apache.org>.
bodewig commented on PR #217:
URL: https://github.com/apache/ant/pull/217#issuecomment-2927248925
In general I would not recommend using Ant's zip classes but rather Apache Commons Compress unless you've got a dependency on Ant anyway. Commons Compress has been seeded with code written for Ant and expanded from there.
--
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
Re: [PR] Fix PermissionUtils.FileType.of for sym links [ant]
Posted by "kiendang (via GitHub)" <gi...@apache.org>.
kiendang commented on PR #217:
URL: https://github.com/apache/ant/pull/217#issuecomment-2927322693
Yup I'm aware of that. We were using Apache Commons Compress as a shaded dependency to provide zip support but it also depends on Apache Commons IO which means we'd have to shade that as well while `org.apache.ant.tools.zip` has no third party dependency and is thus more convenient to shade. `org.apache.ant.tools.zip` does provide all the needed functionalities and zip support is not critical so we went with that.
--
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
Re: [PR] Fix PermissionUtils.FileType.of for sym links [ant]
Posted by "bodewig (via GitHub)" <gi...@apache.org>.
bodewig commented on PR #217:
URL: https://github.com/apache/ant/pull/217#issuecomment-2927243089
Thank you
--
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
Re: [PR] Fix PermissionUtils.FileType.of for sym links [ant]
Posted by "kiendang (via GitHub)" <gi...@apache.org>.
kiendang commented on PR #217:
URL: https://github.com/apache/ant/pull/217#issuecomment-2927114218
Changes made 👍
> but for Ant there will probably never be a real difference
Yup I ran into this while using the zip tools for something outside of Ant.
--
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
Re: [PR] Fix PermissionUtils.FileType.of for sym links [ant]
Posted by "bodewig (via GitHub)" <gi...@apache.org>.
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
Re: [PR] Fix PermissionUtils.FileType.of for sym links [ant]
Posted by "bodewig (via GitHub)" <gi...@apache.org>.
bodewig merged PR #217:
URL: https://github.com/apache/ant/pull/217
--
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