ASF Bugzilla – Attachment 22327 Details for
Bug 45499
DirectoryScanner infinitely recurses on symlinks to parent directories
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Help
|
New Account
|
Log In
Remember
[x]
|
Forgot Password
Login:
[x]
[patch]
Patch to DirectoryScanner to prevent recursion on symlinks to ancestor dirs
DirectoryScanner.parentsymlink.patch (text/plain), 1.06 KB, created by
Tim Whittington
on 2008-07-29 19:04:24 UTC
(
hide
)
Description:
Patch to DirectoryScanner to prevent recursion on symlinks to ancestor dirs
Filename:
MIME Type:
Creator:
Tim Whittington
Created:
2008-07-29 19:04:24 UTC
Size:
1.06 KB
patch
obsolete
>Index: DirectoryScanner.java >=================================================================== >--- DirectoryScanner.java (revision 680905) >+++ DirectoryScanner.java (working copy) >@@ -1118,6 +1118,18 @@ > filesNotIncluded.addElement(name); > } > } else { // dir >+ try { >+ // Check for symlinks to parent directories (ala Java SE 1.6 on Mac OS X) >+ if (FILE_UTILS.isLeadingPath(file.getCanonicalFile(), dir.getCanonicalFile())) { >+ continue; >+ } >+ } catch (IOException e) { >+ String msg = "IOException caught while checking " >+ + "for links to parent dirs, couldn't get canonical path!"; >+ // will be caught and redirected to Ant's logging system >+ System.err.println(msg); >+ } >+ > if (isIncluded(name)) { > accountForIncludedDir(name, file, fast, children); > } else {
You cannot view the attachment while viewing its details because your browser does not support IFRAMEs.
View the attachment on a separate page
.
View Attachment As Diff
View Attachment As Raw
Actions:
View
|
Diff
Attachments on
bug 45499
: 22327 |
22748
|
22751
|
22752