You are viewing a plain text version of this content. The canonical link for it is here.
Posted to reviews@spark.apache.org by "LuciferYang (via GitHub)" <gi...@apache.org> on 2025/01/03 10:52:38 UTC
Re: [PR] [SPARK-50716][CORE] Fix the cleanup logic for symbolic links in `JavaUtils.deleteRecursivelyUsingJavaIO` method [spark]
LuciferYang commented on code in PR #49347:
URL: https://github.com/apache/spark/pull/49347#discussion_r1901671633
##########
core/src/test/scala/org/apache/spark/util/UtilsSuite.scala:
##########
@@ -731,6 +732,52 @@ class UtilsSuite extends SparkFunSuite with ResetSystemProperties {
assert(!sourceFile2.exists())
}
+ test("SPARK-50716: deleteRecursively - SymbolicLink To File") {
Review Comment:
The addition of this test is solely to improve coverage.
Without the current pr, since the `BasicFileAttributes` of a file are read without using `LinkOption.NOFOLLOW_LINKS`, for symbolic links, the `BasicFileAttributes` of the corresponding file are read instead.
As a result, it is treated as a RegularFile and deleted.
--
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: reviews-unsubscribe@spark.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: reviews-unsubscribe@spark.apache.org
For additional commands, e-mail: reviews-help@spark.apache.org