Skip to content

Commit 3255ca1

Browse files
authored
Merge pull request #17 from wkornewald/fix-path-on-windows
fixed path handling on Windows
2 parents 8cd8851 + 1528f4c commit 3255ca1

File tree

1 file changed

+3
-2
lines changed

1 file changed

+3
-2
lines changed

third_party/test/render_svg_test.dart

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -8,8 +8,9 @@ import 'package:test/test.dart';
88
import '../tool/gen_golden.dart' as golden;
99

1010
Iterable<File> getGoldenFileNames() sync* {
11-
final Directory dir = new Directory(join(dirname(Platform.script.path),
12-
dirname(Platform.script.path).endsWith('test') ? '..' : '', 'golden'));
11+
final String root = dirname(Platform.script.toFilePath());
12+
final Directory dir = new Directory(join(root,
13+
root.endsWith('test') ? '..' : '', 'golden'));
1314
for (FileSystemEntity fe in dir.listSync(recursive: true)) {
1415
if (fe is File && fe.path.toLowerCase().endsWith('.png')) {
1516
yield fe;

0 commit comments

Comments
 (0)