[UNTESTED] fix linux apps/prefix sync
This commit is contained in:
parent
be47433c32
commit
4680d7f014
6 changed files with 24 additions and 25 deletions
|
|
@ -118,18 +118,20 @@ function createPusher(api) {
|
|||
clearTimeout(timer)
|
||||
fn(value)
|
||||
}
|
||||
// unit and path travel as headers: constant per request
|
||||
// Unit and path travel in the query, percent-encoded: Node refuses any
|
||||
// header value holding a code above U+00FF (ERR_INVALID_CHAR), which a
|
||||
// real library has (Minecraft pack names, Polish file names), and that
|
||||
// refusal used to kill the sync mid-unit.
|
||||
const query = `token=${encodeURIComponent(token)}&unit=${encodeURIComponent(unitKey)}&path=${encodeURIComponent(rel)}`
|
||||
const req = http.request(
|
||||
{
|
||||
host: device.address,
|
||||
port: device.port,
|
||||
path: `/plwl/unit/file?token=${encodeURIComponent(token)}`,
|
||||
path: `/plwl/unit/file?${query}`,
|
||||
method: 'PUT',
|
||||
headers: {
|
||||
'content-type': 'application/octet-stream',
|
||||
'content-length': fs.statSync(abs).size,
|
||||
'x-plwl-unit': unitKey,
|
||||
'x-plwl-path': rel
|
||||
'content-length': fs.statSync(abs).size
|
||||
},
|
||||
timeout: 0
|
||||
},
|
||||
|
|
@ -254,7 +256,10 @@ function createPusher(api) {
|
|||
args: g.args || '',
|
||||
env: g.env || {},
|
||||
dllOverrides: g.dllOverrides || [],
|
||||
disableUmu: !!g.disableUmu
|
||||
disableUmu: !!g.disableUmu,
|
||||
// Linux-only app config, part of the app's configuration as well
|
||||
isolation: g.isolation,
|
||||
forceX11: !!g.forceX11
|
||||
}))
|
||||
payload.appOrder = games.map(g => g.id)
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue