fsparv commented on code in PR #2651:
URL: https://github.com/apache/solr/pull/2651#discussion_r1719890154
##########
solr/core/src/java/org/apache/solr/util/FileTypeMagicUtil.java:
##########
@@ -60,6 +60,14 @@ public static void assertConfigSetFolderLegal(Path confPath)
throws IOException
new SimpleFileVisitor<>() {
@Override
public FileVisitResult visitFile(Path file, BasicFileAttributes
attrs) {
+ if (Files.isSymbolicLink(file)) {
Review Comment:
Ah so much easier then when I had to detect symlinks for Apache Ant back in
the day :) (https://bz.apache.org/bugzilla/show_bug.cgi?id=1550#c14)
However, I'm not sure it's valid to assume the user never wants to follow
symbolic link. I can certainly imagine cases where folks would use a symlink
for things they wanted to keep synced across config sets. It seems to me the
correct behavior is to A) check for loops and fail if the symlinks are
circular, and B) unroll the symlink (possibly emitting a warning) so that the
contents are represented as the same tree that a person navigating with a shell
would perceive.
--
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]
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]