You are viewing a plain text version of this content. The canonical link for it is here.
Posted to notifications@ant.apache.org by bo...@apache.org on 2018/07/01 09:24:25 UTC
[3/9] ant git commit: document what FileUtils#normalize does in a
certain edge case
document what FileUtils#normalize does in a certain edge case
Project: http://git-wip-us.apache.org/repos/asf/ant/repo
Commit: http://git-wip-us.apache.org/repos/asf/ant/commit/8cfee71c
Tree: http://git-wip-us.apache.org/repos/asf/ant/tree/8cfee71c
Diff: http://git-wip-us.apache.org/repos/asf/ant/diff/8cfee71c
Branch: refs/heads/master
Commit: 8cfee71c77e69876a898b40605082f75a6e0420f
Parents: 29d13b4
Author: Stefan Bodewig <bo...@apache.org>
Authored: Sun Jul 1 10:28:10 2018 +0200
Committer: Stefan Bodewig <bo...@apache.org>
Committed: Sun Jul 1 10:28:10 2018 +0200
----------------------------------------------------------------------
src/main/org/apache/tools/ant/util/FileUtils.java | 8 ++++++--
1 file changed, 6 insertions(+), 2 deletions(-)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/ant/blob/8cfee71c/src/main/org/apache/tools/ant/util/FileUtils.java
----------------------------------------------------------------------
diff --git a/src/main/org/apache/tools/ant/util/FileUtils.java b/src/main/org/apache/tools/ant/util/FileUtils.java
index 9b5ff4f..5e5b946 100644
--- a/src/main/org/apache/tools/ant/util/FileUtils.java
+++ b/src/main/org/apache/tools/ant/util/FileUtils.java
@@ -723,8 +723,12 @@ public class FileUtils {
* <li>DOS style paths that start with a drive letter will have
* \ as the separator.</li>
* </ul>
- * Unlike {@link File#getCanonicalPath()} this method
- * specifically does not resolve symbolic links.
+ * <p>Unlike {@link File#getCanonicalPath()} this method
+ * specifically does not resolve symbolic links.</p>
+ *
+ * <p>If the path tries to go beyond the file system root (i.e. it
+ * contains more ".." segments than can be travelled up) the
+ * method will return the original path unchanged.</p>
*
* @param path the path to be normalized.
* @return the normalized version of the path.