Use FileSystem.pathSeparator instead of Platform.pathSeparator (#7417)
This commit is contained in:
@@ -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, {
|
||||
|
||||
@@ -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;
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user