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

Unified Diff: lib/src/info.dart

Issue 12474009: Fix path bug in windows, don't emit code altogether if we have already seen (Closed) Base URL: git@github.com:dart-lang/web-ui.git@master
Patch Set: Created 7 years, 9 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 | « lib/src/dart_parser.dart ('k') | pubspec.yaml » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: lib/src/info.dart
diff --git a/lib/src/info.dart b/lib/src/info.dart
index e962480f0050716acc875685e166c31ade336488..a9dc3578cb295c17cceabbe75f48bd970447c02c 100644
--- a/lib/src/info.dart
+++ b/lib/src/info.dart
@@ -67,14 +67,15 @@ class PathInfo {
bool checkInputPath(String input, Messages messages) {
if (_mangleFilenames) return true;
var canonicalized = path.normalize(input);
- if (!path.relative(canonicalized, from: _outputDir).startsWith('../')) {
+ var parentDir = '..${path.separator}';
+ if (!path.relative(canonicalized, from: _outputDir).startsWith(parentDir)) {
messages.error(
'The file ${input} cannot be processed. '
'Files cannot be under the output folder (${_outputDir}).',
null, file: input);
return false;
}
- if (path.relative(canonicalized, from: _baseDir).startsWith('../')) {
+ if (path.relative(canonicalized, from: _baseDir).startsWith(parentDir)) {
messages.error(
'The file ${input} cannot be processed. '
'All processed files must be under the base folder (${_baseDir}), you'
« no previous file with comments | « lib/src/dart_parser.dart ('k') | pubspec.yaml » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698