Use FileSystem.pathSeparator instead of Platform.pathSeparator (#7417)

This commit is contained in:
Todd Volkert
2017-01-10 13:17:20 -08:00
committed by GitHub
parent 03d1980733
commit 1ccbf8f00d
6 changed files with 7 additions and 10 deletions

View File

@@ -5,6 +5,7 @@
import 'dart:async';
import 'dart:convert';
import 'file_system.dart';
import 'io.dart';
import 'process_manager.dart';
import '../globals.dart';
@@ -202,7 +203,7 @@ void _traceCommand(List<String> args, { String workingDirectory }) {
if (workingDirectory == null)
printTrace(argsText);
else
printTrace("[$workingDirectory${Platform.pathSeparator}] $argsText");
printTrace("[$workingDirectory${fs.pathSeparator}] $argsText");
}
String _runWithLoggingSync(List<String> cmd, {

View File

@@ -93,7 +93,7 @@ String getElapsedAsMilliseconds(Duration duration) {
/// Return a relative path if [fullPath] is contained by the cwd, else return an
/// absolute path.
String getDisplayPath(String fullPath) {
String cwd = fs.currentDirectory.path + Platform.pathSeparator;
String cwd = fs.currentDirectory.path + fs.pathSeparator;
return fullPath.startsWith(cwd) ? fullPath.substring(cwd.length) : fullPath;
}