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
03d31865
Commit
03d31865
authored
Mar 10, 2017
by
Michael Goderbauer
Committed by
GitHub
Mar 10, 2017
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Transfer URIs instead of platform-dependent file paths (#8701)
parent
34ed3d2d
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
5 additions
and
7 deletions
+5
-7
engine.version
bin/internal/engine.version
+1
-1
devfs.dart
packages/flutter_tools/lib/src/devfs.dart
+3
-5
devfs_test.dart
packages/flutter_tools/test/devfs_test.dart
+1
-1
No files found.
bin/internal/engine.version
View file @
03d31865
6e54f5e31f084d2e54a510959f68b89e4d2fdffd
e0c702e35300b7fdef975b9929df25e112fa9eda
packages/flutter_tools/lib/src/devfs.dart
View file @
03d31865
...
...
@@ -199,8 +199,7 @@ class ServiceProtocolDevFSOperations implements DevFSOperations {
'_writeDevFSFile'
,
params:
<
String
,
dynamic
>
{
'fsName'
:
fsName
,
// TODO(goderbauer): transfer real Uri (instead of file path) when remote end supports it
'path'
:
deviceUri
.
toFilePath
(
windows:
false
),
'uri'
:
deviceUri
.
toString
(),
'fileContents'
:
fileContents
},
);
...
...
@@ -268,9 +267,8 @@ class _DevFSHttpWriter {
final
HttpClientRequest
request
=
await
_client
.
putUrl
(
httpAddress
);
request
.
headers
.
removeAll
(
HttpHeaders
.
ACCEPT_ENCODING
);
request
.
headers
.
add
(
'dev_fs_name'
,
fsName
);
// TODO(goderbauer): transfer real Uri (instead of file path) when remote end supports it
request
.
headers
.
add
(
'dev_fs_path_b64'
,
BASE64
.
encode
(
UTF8
.
encode
(
deviceUri
.
toFilePath
(
windows:
false
))));
request
.
headers
.
add
(
'dev_fs_uri_b64'
,
BASE64
.
encode
(
UTF8
.
encode
(
deviceUri
.
toString
())));
final
Stream
<
List
<
int
>>
contents
=
content
.
contentsAsCompressedStream
();
await
request
.
addStream
(
contents
);
final
HttpClientResponse
response
=
await
request
.
close
();
...
...
packages/flutter_tools/test/devfs_test.dart
View file @
03d31865
...
...
@@ -299,7 +299,7 @@ class MockVMService extends BasicMock implements VMService {
_httpAddress
=
Uri
.
parse
(
'http://127.0.0.1:
${_server.port}
'
);
_server
.
listen
((
HttpRequest
request
)
{
final
String
fsName
=
request
.
headers
.
value
(
'dev_fs_name'
);
final
String
devicePath
=
UTF8
.
decode
(
BASE64
.
decode
(
request
.
headers
.
value
(
'dev_fs_
path
_b64'
)));
final
String
devicePath
=
UTF8
.
decode
(
BASE64
.
decode
(
request
.
headers
.
value
(
'dev_fs_
uri
_b64'
)));
messages
.
add
(
'writeFile
$fsName
$devicePath
'
);
request
.
drain
<
List
<
int
>>().
then
<
Null
>((
List
<
int
>
value
)
{
request
.
response
...
...
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