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' |