Unverified Commit b92f80e2 authored by xster's avatar xster Committed by GitHub

Incorrect path.join usage might be causing Windows test failures (#64056)

parent 734a90eb
...@@ -42,7 +42,8 @@ Future<void> main() async { ...@@ -42,7 +42,8 @@ Future<void> main() async {
final File readonlyTxtAssetFile = await File(path.join( final File readonlyTxtAssetFile = await File(path.join(
projectDir.path, projectDir.path,
'assets/read-only.txt' 'assets',
'read-only.txt'
)) ))
.create(recursive: true); .create(recursive: true);
...@@ -253,7 +254,7 @@ Future<void> main() async { ...@@ -253,7 +254,7 @@ Future<void> main() async {
section('Check file access modes for read-only asset from Flutter module'); section('Check file access modes for read-only asset from Flutter module');
final String readonlyDebugAssetFilePath = path.join( final String readonlyDebugAssetFilePath = path.joinAll(<String>[
hostApp.path, hostApp.path,
'SampleApp', 'SampleApp',
'build', 'build',
...@@ -261,8 +262,10 @@ Future<void> main() async { ...@@ -261,8 +262,10 @@ Future<void> main() async {
'merged_assets', 'merged_assets',
'debug', 'debug',
'out', 'out',
'flutter_assets/assets/read-only.txt', 'flutter_assets',
); 'assets',
'read-only.txt',
]);
final File readonlyDebugAssetFile = File(readonlyDebugAssetFilePath); final File readonlyDebugAssetFile = File(readonlyDebugAssetFilePath);
if (!exists(readonlyDebugAssetFile)) { if (!exists(readonlyDebugAssetFile)) {
return TaskResult.failure('Failed to copy read-only asset file'); return TaskResult.failure('Failed to copy read-only asset file');
...@@ -323,7 +326,7 @@ Future<void> main() async { ...@@ -323,7 +326,7 @@ Future<void> main() async {
section('Check file access modes for read-only asset from Flutter module'); section('Check file access modes for read-only asset from Flutter module');
final String readonlyReleaseAssetFilePath = path.join( final String readonlyReleaseAssetFilePath = path.joinAll(<String>[
hostApp.path, hostApp.path,
'SampleApp', 'SampleApp',
'build', 'build',
...@@ -331,8 +334,10 @@ Future<void> main() async { ...@@ -331,8 +334,10 @@ Future<void> main() async {
'merged_assets', 'merged_assets',
'release', 'release',
'out', 'out',
'flutter_assets/assets/read-only.txt', 'flutter_assets',
); 'assets',
'read-only.txt',
]);
final File readonlyReleaseAssetFile = File(readonlyReleaseAssetFilePath); final File readonlyReleaseAssetFile = File(readonlyReleaseAssetFilePath);
if (!exists(readonlyReleaseAssetFile)) { if (!exists(readonlyReleaseAssetFile)) {
return TaskResult.failure('Failed to copy read-only asset file'); return TaskResult.failure('Failed to copy read-only asset file');
......
...@@ -42,7 +42,8 @@ Future<void> main() async { ...@@ -42,7 +42,8 @@ Future<void> main() async {
final File readonlyTxtAssetFile = await File(path.join( final File readonlyTxtAssetFile = await File(path.join(
projectDir.path, projectDir.path,
'assets/read-only.txt' 'assets',
'read-only.txt'
)) ))
.create(recursive: true); .create(recursive: true);
...@@ -253,7 +254,7 @@ Future<void> main() async { ...@@ -253,7 +254,7 @@ Future<void> main() async {
section('Check file access modes for read-only asset from Flutter module'); section('Check file access modes for read-only asset from Flutter module');
final String readonlyDebugAssetFilePath = path.join( final String readonlyDebugAssetFilePath = path.joinAll(<String>[
hostApp.path, hostApp.path,
'app', 'app',
'build', 'build',
...@@ -261,8 +262,10 @@ Future<void> main() async { ...@@ -261,8 +262,10 @@ Future<void> main() async {
'merged_assets', 'merged_assets',
'debug', 'debug',
'out', 'out',
'flutter_assets/assets/read-only.txt', 'flutter_assets',
); 'assets',
'read-only.txt',
]);
final File readonlyDebugAssetFile = File(readonlyDebugAssetFilePath); final File readonlyDebugAssetFile = File(readonlyDebugAssetFilePath);
if (!exists(readonlyDebugAssetFile)) { if (!exists(readonlyDebugAssetFile)) {
return TaskResult.failure('Failed to copy read-only asset file'); return TaskResult.failure('Failed to copy read-only asset file');
...@@ -323,7 +326,7 @@ Future<void> main() async { ...@@ -323,7 +326,7 @@ Future<void> main() async {
section('Check file access modes for read-only asset from Flutter module'); section('Check file access modes for read-only asset from Flutter module');
final String readonlyReleaseAssetFilePath = path.join( final String readonlyReleaseAssetFilePath = path.joinAll(<String>[
hostApp.path, hostApp.path,
'app', 'app',
'build', 'build',
...@@ -331,8 +334,10 @@ Future<void> main() async { ...@@ -331,8 +334,10 @@ Future<void> main() async {
'merged_assets', 'merged_assets',
'release', 'release',
'out', 'out',
'flutter_assets/assets/read-only.txt', 'flutter_assets',
); 'assets',
'read-only.txt',
]);
final File readonlyReleaseAssetFile = File(readonlyReleaseAssetFilePath); final File readonlyReleaseAssetFile = File(readonlyReleaseAssetFilePath);
if (!exists(readonlyReleaseAssetFile)) { if (!exists(readonlyReleaseAssetFile)) {
return TaskResult.failure('Failed to copy read-only asset file'); return TaskResult.failure('Failed to copy read-only asset file');
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment