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

Unified Diff: tools/testing/dart/legacy_path.dart

Issue 560643002: Allow trailing / in directory paths (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: Created 6 years, 3 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 | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: tools/testing/dart/legacy_path.dart
diff --git a/tools/testing/dart/legacy_path.dart b/tools/testing/dart/legacy_path.dart
index 73ad68c33192b0cbad67310f2cd6709288ae36be..57a4ac7013502b8432103983b986bf4ce003b276 100644
--- a/tools/testing/dart/legacy_path.dart
+++ b/tools/testing/dart/legacy_path.dart
@@ -17,6 +17,10 @@ class Path {
static String _clean(String source) {
if (Platform.operatingSystem == 'windows') return _cleanWindows(source);
+ // Remove trailing slash from directories:
+ if (source.length > 1 && source.endsWith('/')) {
+ return source.substring(0, source.length - 1);
+ }
return source;
}
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698