Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Sign in
Toggle navigation
F
Front-End
Project
Project
Details
Activity
Releases
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
abdullh.alsoleman
Front-End
Commits
68e768db
Unverified
Commit
68e768db
authored
Oct 15, 2019
by
Jonah Williams
Committed by
GitHub
Oct 15, 2019
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
fix type error in manifest asset bundle (#42791)
parent
31cb4482
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
30 additions
and
1 deletion
+30
-1
asset.dart
packages/flutter_tools/lib/src/asset.dart
+1
-1
asset_bundle_test.dart
...s/flutter_tools/test/general.shard/asset_bundle_test.dart
+29
-0
No files found.
packages/flutter_tools/lib/src/asset.dart
View file @
68e768db
...
...
@@ -94,7 +94,7 @@ class _ManifestAssetBundle implements AssetBundle {
if
(!
directory
.
existsSync
())
{
return
true
;
// directory was deleted.
}
for
(
File
file
in
directory
.
listSync
())
{
for
(
File
file
in
directory
.
listSync
()
.
whereType
<
File
>()
)
{
final
DateTime
dateTime
=
file
.
statSync
().
modified
;
if
(
dateTime
==
null
)
{
continue
;
...
...
packages/flutter_tools/test/general.shard/asset_bundle_test.dart
View file @
68e768db
...
...
@@ -148,6 +148,35 @@ name: example''')
FileSystem:
()
=>
testFileSystem
,
ProcessManager:
()
=>
FakeProcessManager
(<
FakeCommand
>[]),
});
// https://github.com/flutter/flutter/issues/42723
testUsingContext
(
'Test regression for mistyped file'
,
()
async
{
fs
.
file
(
fs
.
path
.
join
(
'assets'
,
'foo'
,
'bar.txt'
)).
createSync
(
recursive:
true
);
// Create a directory in the same path to test that we're only looking at File
// objects.
fs
.
directory
(
fs
.
path
.
join
(
'assets'
,
'foo'
,
'bar'
)).
createSync
();
fs
.
file
(
'pubspec.yaml'
)
..
createSync
()
..
writeAsStringSync
(
r''
'
name: example
flutter:
assets:
- assets/foo/
'''
);
fs
.
file
(
'.packages'
).
createSync
();
final
AssetBundle
bundle
=
AssetBundleFactory
.
instance
.
createBundle
();
await
bundle
.
build
(
manifestPath:
'pubspec.yaml'
);
// Expected assets:
// - asset manifest
// - font manifest
// - license file
// - assets/foo/bar.txt
expect
(
bundle
.
entries
.
length
,
4
);
expect
(
bundle
.
needsBuild
(
manifestPath:
'pubspec.yaml'
),
false
);
},
overrides:
<
Type
,
Generator
>{
FileSystem:
()
=>
testFileSystem
,
ProcessManager:
()
=>
FakeProcessManager
(<
FakeCommand
>[]),
});
});
}
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment