Changeset 1659
- Timestamp:
- 02/11/07 07:55:28 (2 years ago)
- Files:
-
- trunk/tango/util/PathUtil.d (modified) (4 diffs)
Legend:
- Unmodified
- Added
- Removed
- Modified
- Copied
- Moved
trunk/tango/util/PathUtil.d
r1235 r1659 35 35 be fully normalized. 36 36 37 Throws: NormalizeException if the root separator is followed by ..37 Throws: Exception if the root separator is followed by .. 38 38 39 39 Examples: … … 77 77 int findSlashDot(char[] path, int start) { 78 78 assert(start < path.length); 79 foreach(i, c; path[start..$ ]) {79 foreach(i, c; path[start..$-1]) { 80 80 if (c == FileConst.PathSeparatorChar) { 81 81 if (path[start+i+1] == '.') { … … 186 186 debug (UnitTest) 187 187 { 188 188 189 unittest 189 190 { … … 202 203 assert (normalize ("../../foo/bar") == "../../foo/bar"); 203 204 assert (normalize ("../../../foo/bar") == "../../../foo/bar"); 205 assert (normalize ("d/") == "d/"); 204 206 } 205 207












