[ 
https://issues.apache.org/jira/browse/SLING-6524?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=15871633#comment-15871633
 ] 

Timothee Maret commented on SLING-6524:
---------------------------------------

Debugging the {{FileUtils.deleteDirectory}} implementation currently used 
({{commons-io 2.4}}), the issue is that the {{isSymLink}} method wrongly 
reports the test folder as being a symlink. Although the is indeed a symlink at 
the root of the path, the test folder itself is _not_ a symlink. The symlink 
check is done only by checking if the [1] if the canonical file matches the 
absolute path, which is not sufficient to detect which node along the path is a 
symlink.

With {{commons-io 2.5}}, the {{isSymlink}} implementation has changed and 
ultimately delegates to java7 isSymbolicLink implementation. The test path is 
not treated as a symlink and thus deleted correctly.

[0] 
https://github.com/apache/sling/blob/trunk/contrib/extensions/distribution/core/pom.xml#L283
 
[1] 
https://github.com/apache/commons-io/blob/2.4/src/main/java/org/apache/commons/io/FileUtils.java#L2935

> SimpleDistributionQueueProviderTest#testEnableQueueProcessingWithCheckpointRecovery
>  fails with symlinks
> -------------------------------------------------------------------------------------------------------
>
>                 Key: SLING-6524
>                 URL: https://issues.apache.org/jira/browse/SLING-6524
>             Project: Sling
>          Issue Type: Bug
>          Components: Content Distribution
>            Reporter: Timothee Maret
>            Assignee: Timothee Maret
>
> As reported by Daniel Klco on [0], the unit test 
> {{SimpleDistributionQueueProviderTest#testEnableQueueProcessingWithCheckpointRecovery}}
>  fail when checking out the project from a tag under {{/tmp}}.
> [0] https://www.mail-archive.com/[email protected]/msg64497.html



--
This message was sent by Atlassian JIRA
(v6.3.15#6346)

Reply via email to