Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(911)

Unified Diff: sdk/lib/_internal/dartdoc/lib/dartdoc.dart

Issue 11959011: Fix Path.relativeTo in special case where base is a substring of this. (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: Fixed another bug - added tests for it. Created 7 years, 11 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « no previous file | sdk/lib/io/path_impl.dart » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: sdk/lib/_internal/dartdoc/lib/dartdoc.dart
diff --git a/sdk/lib/_internal/dartdoc/lib/dartdoc.dart b/sdk/lib/_internal/dartdoc/lib/dartdoc.dart
index 9b51ff461e9725ee59170e4b9aeb962b135caf5a..9470ecca0de80346ee047f7af6862307dfeed811 100644
--- a/sdk/lib/_internal/dartdoc/lib/dartdoc.dart
+++ b/sdk/lib/_internal/dartdoc/lib/dartdoc.dart
@@ -1836,20 +1836,7 @@ class Dartdoc {
if (filename.endsWith('appcache.manifest')) {
return;
}
- // TODO(johnniwinther): If [outputDir] has trailing slashes, [filename]
- // contains double (back)slashes for files in the immediate [toCache]
- // directory. These are not handled by [relativeTo] thus
- // wrongfully producing the path `/foo.html` for a file `foo.html` in
- // [toCache].
- //
- // This can be handled in two ways. 1) By ensuring that
- // [Directory.fromPath] does not receive a path with a trailing slash, or
- // better, by making [Directory.fromPath] handle such trailing slashes.
- // 2) By ensuring that [filePath] does not have double slashes before
- // calling [relativeTo], or better, by making [relativeTo] handle double
- // slashes correctly.
- Path filePath = new Path(filename).canonicalize();
- Path relativeFilePath = filePath.relativeTo(outputDir);
+ Path relativeFilePath = new Path(filename).relativeTo(outputDir);
write("$relativeFilePath\n");
};
toCacheLister.onDone = (done) => endFile();
« no previous file with comments | « no previous file | sdk/lib/io/path_impl.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698