Mercurial > hg4j
diff src/org/tmatesoft/hg/util/PathRewrite.java @ 142:37a34044e6bd
More reasonable use of path normalizer and path.source
author | Artem Tikhomirov <tikhomirov.artem@gmail.com> |
---|---|
date | Thu, 17 Feb 2011 05:06:07 +0100 |
parents | 8248aae33f7d |
children | a415fe296a50 |
line wrap: on
line diff
--- a/src/org/tmatesoft/hg/util/PathRewrite.java Thu Feb 17 04:08:34 2011 +0100 +++ b/src/org/tmatesoft/hg/util/PathRewrite.java Thu Feb 17 05:06:07 2011 +0100 @@ -20,7 +20,8 @@ import java.util.List; /** - * + * File names often need transformations, like Windows-style path to Unix or human-readable data file name to storage location. + * * @author Artem Tikhomirov * @author TMate Software Ltd. */ @@ -40,8 +41,8 @@ public Composite(PathRewrite... e) { LinkedList<PathRewrite> r = new LinkedList<PathRewrite>(); - for (int i = (e == null ? -1 : e.length); i >=0; i--) { - r.addFirst(e[i]); + for (int i = 0; e != null && i < e.length; i++) { + r.addLast(e[i]); } chain = r; }